Skip to content

Instantly share code, notes, and snippets.

View JamPsym's full-sized avatar
💭
PIES SIĘ USMIAŁ PIES SMIEC

Jam Psym JamPsym

💭
PIES SIĘ USMIAŁ PIES SMIEC
View GitHub Profile
@JamPsym
JamPsym / .c
Created December 16, 2020 11:05
// IQ200:
uint8_t tbuffer[512];
void transmit_float(float* fbuffer, size_t tran_length)
{
// transform float into uint8_t
for(size_t j=0; j<tran_length; j++)
{
union float_union {float f; uint8_t f_ui[4];} uf;
uf.f = fbuffer[j];
@JamPsym
JamPsym / gist:871497f5537f19d8bd296dacbe2bcb4d
Created April 11, 2020 14:32
jakże robić definicje wartości pól dla strukturek
7 struct setup_data {
8 struct bmRequestType_t bmRequestType;
9 uint8_t bRequest;
10 uint16_t : 16;
11 uint16_t wValue;
12 uint16_t : 16;
13 uint16_t wIndex;
14 uint16_t : 16;
15 uint16_t wLength;
16 uint16_t : 16;