Download General purpose ST7540 power line modem module based on

Transcript
Firmware description
6.5
UM1619
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
APP_ERROR_GENERIC
APP_ERROR_COMM_TIMEOUT
APP_ERROR_SERVICE_GRP_UNKNOWN
APP_ERROR_SERVICE_CMD_ERROR
APP_ERROR_COMMUNICATION
APP_ERROR_ISOLATED_NODE
APP_ERROR_HARDWARE
APP_ERROR_WRONG_PROG_COMMAND
APP_ERROR_WRONG_PROG_GROUP
APP_ERROR_DEVICE_BLANK
APP_ERROR_RTC_ERROR
APP_ERROR_WATCHDOG_DISABLED
APP_ERROR_NODE_INIT_FAILED
APP_ERROR_RTC_DISABLED
}APP_ERROR_t;
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
0x00,
0x01,
0x02,
0x03,
0x04,
0x05,
0x06,
0x07,
0x08,
0x09,
0x0a,
0x0b,
0x0c,
0x0d,
0x0e
/* USER COMMUNICATION FLAGS */
typedef enum
{
USER_DATA_TRANSMISSION_START,
USER_DATA_TRANSMISSION_END,
USER_DATA_ARRIVED,
USER_DATA_COMMUNICATION_ERROR,
32/56
DocID024383 Rev 1
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
No error
Generic communication error
Communication timeout error
Service group unknown error
Service command error
Communication error
Node unreachable error
Hardware error
Wrong programming command error
Wrong programming group error
Device blank
Error setting the system time
Hardware reset impossible
Node initialization failure
Internal RTC disabled