Firmware description
UM1619
32/56
DocID024383 Rev 1
6.5 Firmware
data
types
The data type found in the application.h module, are listed below:
/* USER FRAME STRUCTURE */
typedef struct
{
APP_source_t
source;
APP_ftype_t
type;
bool
broadcast;
u16
group;
u32
address;
u8
len;
u8
data[
USER_PAYLOAD_SIZE
]; /* MAX PAYLOAD SIZE: 100 bytes */
APP_ERROR_t
error;
}
APP_userdata_t;
/* PERIPHERAL SOURCE TYPE */
typedef enum
{
SOURCE_COMM,
SOURCE_USB,
SOURCE_SPI,
SOURCE_PLM
}
APP_source_t
;
/* APPLICATION FRAME TYPE */
typedef enum
{
APP_DATA_FRAME = 0x00,
APP_SERVICE_FRAME = 0x01,
APP_PING_FRAME = 0x02,
APP_ERROR_FRAME = 0x03,
APP_PROGRAMMING_FRAME = 0x04,
APP_ACK_FRAME = 0x05
/* <!> MAX ALLOWED TYPE RANGE: FROM 0x00 TO 0x7F */
}
APP_ftype_t
;
/* APPLICATION ERRORS */
typedef enum
{
APP_ERROR_NONE = 0x00,
// No error
APP_ERROR_GENERIC = 0x01,
// Generic communication error
APP_ERROR_COMM_TIMEOUT = 0x02,
// Communication timeout error
APP_ERROR_SERVICE_GRP_UNKNOWN = 0x03,
// Service group unknown error
APP_ERROR_SERVICE_CMD_ERROR = 0x04,
// Service command error
APP_ERROR_COMMUNICATION = 0x05,
// Communication error
APP_ERROR_ISOLATED_NODE = 0x06,
// Node unreachable error
APP_ERROR_HARDWARE = 0x07,
// Hardware error
APP_ERROR_WRONG_PROG_COMMAND = 0x08,
// Wrong programming command error
APP_ERROR_WRONG_PROG_GROUP = 0x09,
// Wrong programming group error
APP_ERROR_DEVICE_BLANK = 0x0a,
// Device blank
APP_ERROR_RTC_ERROR = 0x0b,
// Error setting the system time
APP_ERROR_WATCHDOG_DISABLED = 0x0c,
// Hardware reset impossible
APP_ERROR_NODE_INIT_FAILED = 0x0d,
// Node initialization failure
APP_ERROR_RTC_DISABLED = 0x0e
// Internal RTC disabled
}
APP_ERROR_t
;
/* USER COMMUNICATION FLAGS */
typedef enum
{
USER_DATA_TRANSMISSION_START,
USER_DATA_TRANSMISSION_END,
USER_DATA_ARRIVED,
USER_DATA_COMMUNICATION_ERROR,