chuniio-brokenithm/chuniio/src/servers/common.h

31 lines
557 B
C

//
// Created by beerpsi on 12/31/2023.
//
#ifndef CHUNIIO_BROKENITHM_COMMON_H
#define CHUNIIO_BROKENITHM_COMMON_H
#include <stdbool.h>
#include <stdint.h>
enum FunctionButton {
INVALID __attribute__((unused)),
FUNCTION_COIN,
FUNCTION_CARD,
};
#pragma pack(push)
#pragma pack(1)
struct PacketFunction {
uint8_t packetSize;
uint8_t packetName[3];
uint8_t funcBtn;
};
#pragma pack(pop)
void print_err(const char *fmt, ...);
void dump_bytes(const void *ptr, size_t nbytes, bool hex_string);
#endif // CHUNIIO_BROKENITHM_COMMON_H