29 #ifndef BAREMETAL_PLATFORM_CASCODA_NUVOTON_CHILI2_LDROM_UART_LDROM_UART_H_ 
   30 #define BAREMETAL_PLATFORM_CASCODA_NUVOTON_CHILI2_LDROM_UART_LDROM_UART_H_ 
   39 #if (UART_CHANNEL == 0) 
   40 #define CLK_APBCLK_MASK CLK_APBCLK0_UART0CKEN_Msk 
   42 #define UART_IRQn UART0_IRQn 
   43 #elif (UART_CHANNEL == 1) 
   44 #define CLK_APBCLK_MASK CLK_APBCLK0_UART1CKEN_Msk 
   46 #define UART_IRQn UART1_IRQn 
   47 #elif (UART_CHANNEL == 2) 
   48 #define CLK_APBCLK_MASK CLK_APBCLK0_UART2CKEN_Msk 
   50 #define UART_IRQn UART2_IRQn 
   51 #elif (UART_CHANNEL == 4) 
   52 #define CLK_APBCLK_MASK CLK_APBCLK0_UART4CKEN_Msk 
   54 #define UART_IRQn UART4_IRQn 
   55 #elif (UART_CHANNEL == 5) 
   56 #define CLK_APBCLK_MASK CLK_APBCLK0_UART5CKEN_Msk 
   58 #define UART_IRQn UART5_IRQn 
   70 #pragma GCC diagnostic push 
   71 #pragma GCC diagnostic ignored "-Wunused-local-typedefs"  
   73 #pragma GCC diagnostic pop 
  157 #define SERIAL_SOM (0xDE) 
Global error declarations for use across the Cascoda SDK.
 
Definitions relating to EVBME API messages.
 
struct SerialUARTBuf gRxBuffer
Definition: hid_transfer.c:61
 
struct SerialUARTBuf gTxBuffer
Definition: hid_transfer.c:62
 
enum serial_state gSerialRxState
Definition: uart_transfer.c:39
 
ca_static_assert(sizeof(struct dfu_write_cmd_aligned)==248)
 
serial_state
Definition: ldrom_uart.h:150
 
@ SERIAL_DATA
Definition: ldrom_uart.h:154
 
@ SERIAL_CMDID
Definition: ldrom_uart.h:152
 
@ SERIAL_CMDLEN
Definition: ldrom_uart.h:153
 
@ SERIAL_INBETWEEN
Definition: ldrom_uart.h:151
 
volatile bool gSerialTxStalled
Definition: uart_transfer.c:40
 
void RxHandled(void)
Definition: hid_transfer.c:212
 
void UART_Init(void)
Definition: uart_transfer.c:263
 
void TxReady(void)
Definition: hid_transfer.c:218
 
Cascoda serialbuffer structure.
Definition: ldrom_uart.h:138
 
uint8_t SofPkt
Start of frame.
Definition: ldrom_uart.h:140
 
uint8_t cmdid
Cascoda command ID = EVBME_DFU_CMD (0xA3)
Definition: ldrom_uart.h:141
 
volatile uint8_t isReady
Is ready to: Tx-Write, Rx-Read.
Definition: ldrom_uart.h:139
 
Structure of a DFU message.
Definition: ldrom_uart.h:91
 
Write command to write words of data - aligned for codespace and speed.
Definition: ldrom_hid.h:41
 
uint32_t data[61]
Data to write, must be whole words.
Definition: ldrom_hid.h:43
 
uint8_t startAddr[4]
Start address for writing - must be word aligned.
Definition: ldrom_hid.h:42
 
Check command to validate flash against a checksum.
Definition: evbme_messages.h:148
 
Erase command to erase whole pages.
Definition: evbme_messages.h:130
 
Reboot command to boot into DFU or APROM.
Definition: evbme_messages.h:122
 
Status command used as a reply from the Chili2 to host.
Definition: evbme_messages.h:158
 
Evbme GET confirm struct (to respond to received GET requests)
Definition: ldrom_uart.h:108
 
uint8_t attributeLen
Definition: ldrom_uart.h:111
 
uint8_t status
Definition: ldrom_uart.h:109
 
uint8_t attributeId
Definition: ldrom_uart.h:110
 
Evbme GET request struct (for received messages)
Definition: ldrom_uart.h:100
 
uint8_t attributeId
Definition: ldrom_uart.h:101
 
Union of all DFU commands - version with dfu_write_cmd_aligned.
Definition: ldrom_hid.h:55
 
struct evbme_dfu_reboot_cmd reboot_cmd
Definition: ldrom_hid.h:56
 
struct evbme_dfu_erase_cmd erase_cmd
Definition: ldrom_hid.h:57
 
struct evbme_dfu_check_cmd check_cmd
Definition: ldrom_hid.h:59
 
struct dfu_write_cmd_aligned write_cmd
Definition: ldrom_hid.h:58
 
struct evbme_dfu_status_cmd status_cmd
Definition: ldrom_hid.h:60
 
Union of GET request and confirm structs.
Definition: ldrom_uart.h:119
 
struct evbme_get_confirm cnf
Definition: ldrom_uart.h:121
 
struct evbme_get_request req
Definition: ldrom_uart.h:120
 
Union of all types of "data" (which commes after "cmdid" and "len")
Definition: ldrom_uart.h:128
 
union evbme_msg evbme
Definition: ldrom_uart.h:129
 
struct dfu_cmd_msg dfu
Definition: ldrom_uart.h:130