22 lines
706 B
C
22 lines
706 B
C
|
|
#define TAMPON_TAILLE 1020
|
|
#define NB_MAX_CDC_CONNEXION 10
|
|
#define INVALID_ID ((char)-1)
|
|
|
|
struct log_buffer_t{
|
|
char idx;
|
|
char carte_id;
|
|
char tampon[TAMPON_TAILLE]; // Tampon tournant - 1er niveau de tampon
|
|
char tampon_echange[TAMPON_TAILLE]; // Tampon contenant l'état de la carte
|
|
unsigned int index_tampon_ecriture, index_tampon_lecture;
|
|
};
|
|
|
|
void log_init(void);
|
|
void log_create(const char idx);
|
|
void log_destroy(const char idx);
|
|
void log_analyse(const char idx);
|
|
void log_add(const char idx, const char * buffer, uint16_t buffer_size);
|
|
struct log_buffer_t * get_buffer(const char idx);
|
|
void set_carte_id(uint8_t idx, uint8_t carte_id);
|
|
uint8_t get_carte_idx(uint8_t id_carte);
|