#ifndef LIB_JELLING #ifndef BLUETOOTH_H_INCLUDED #include "libJelling/bluetooth.h" #endif #ifndef MESSAGE_H_INCLUDED #include "libJelling/message.h" #endif #ifndef MODULE_H_INCLUDED #include "libJelling/module.h" #endif #endif #define TOO_LONG 1 #define WRITE_ERROR 2 #define BAD_RESPONSE 3 #define TIMER_ERROR_INSTALL 4 #define TOO_SHORT 5 #define SERIAL_ALREADY_OPEN 6 #define NOT_ENOUGH_RAM 7 #define MISSING_ACK 8 #define UNKNOWN_ERROR 9 #define INVALID_TYPE 10 #define END_OF_COMMUNICATION 11 #define RTC 0.128 #define SIZE_TX 255 #define SIZE_RX 1000 #define SIZE_HEADER 46 #define SIZE_DATA_TX (SIZE_TX-SIZE_HEADER) #define SIZE_DATA_RX (SIZE_RX-SIZE_HEADER) #define RQT 1 #define ASW 2 #define ACK 4 #define HED 8 #define FUL 16 #define ERR 32 #define END 64 #define SYN 128 #define TIME_POS 0 #define TYPE_POS (TIME_POS + 19) #define ID_POS (TYPE_POS + 1) #define SENDER_POS (ID_POS + 4) #define MESSAGE_LENGTH_POS (SENDER_POS + 10) #define PACKET_LENGTH_POS (MESSAGE_LENGTH_POS + 4) #define PART_POS (PACKET_LENGTH_POS + 4) #define NUMBER_PART_POS (PART_POS + 2 )