jp
Size: a a a
jp
jp
r
r
T
r
r
r
jp
VH
jp
VH
VK
VK
typedef struct {
enum packet_type type;
uint8_t data[32];
} packet_t;
static inline uint8_t get_size_for_type(enum packet_type type) {
switch (type) {
case TYPE1:
return 24;
case TYPE2:
return 31;
}
}
while (true) {
packet_t packet;
blocking_read(&packet);
switch(packet.type) {
// ...
}
}
r
И
И
VK
VH
T