Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
ldrom_uart.h File Reference
#include <stdbool.h>
#include <stdint.h>
#include "ca821x_error.h"
#include "cascoda_chili_config.h"
#include "evbme_messages.h"
Include dependency graph for ldrom_uart.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  dfu_write_cmd_aligned
 Write command to write words of data - aligned for codespace and speed. More...
 
union  dfu_cmd_aligned
 Union of all DFU commands - version with dfu_write_cmd_aligned. More...
 
struct  dfu_cmd_msg
 Structure of a DFU message. More...
 
struct  evbme_get_request
 Evbme GET request struct (for received messages) More...
 
struct  evbme_get_confirm
 Evbme GET confirm struct (to respond to received GET requests) More...
 
union  evbme_msg
 Union of GET request and confirm structs. More...
 
union  serial_data
 Union of all types of "data" (which commes after "cmdid" and "len") More...
 
struct  SerialUARTBuf
 Cascoda serialbuffer structure. More...
 

Macros

#define CLK_APBCLK_MASK   CLK_APBCLK0_UART0CKEN_Msk
 
#define UART   UART0
 
#define UART_IRQn   UART0_IRQn
 
#define SERIAL_SOM   (0xDE)
 

Enumerations

enum  serial_state { SERIAL_INBETWEEN = 0 , SERIAL_CMDID = 1 , SERIAL_CMDLEN = 2 , SERIAL_DATA = 3 }
 

Functions

 ca_static_assert (sizeof(struct dfu_write_cmd_aligned)==248)
 
 ca_static_assert (sizeof(struct SerialUARTBuf)==(5+sizeof(struct dfu_write_cmd_aligned)))
 
void UART_Init (void)
 
void RxHandled (void)
 
void TxReady (void)
 

Variables

struct SerialUARTBuf gRxBuffer
 
struct SerialUARTBuf gTxBuffer
 
enum serial_state gSerialRxState
 
volatile bool gSerialTxStalled
 

Macro Definition Documentation

◆ CLK_APBCLK_MASK

#define CLK_APBCLK_MASK   CLK_APBCLK0_UART0CKEN_Msk

◆ SERIAL_SOM

#define SERIAL_SOM   (0xDE)

◆ UART

#define UART   UART0

◆ UART_IRQn

#define UART_IRQn   UART0_IRQn

Enumeration Type Documentation

◆ serial_state

Enumerator
SERIAL_INBETWEEN 
SERIAL_CMDID 
SERIAL_CMDLEN 
SERIAL_DATA 

Function Documentation

◆ ca_static_assert() [1/2]

ca_static_assert ( sizeof(struct dfu_write_cmd_aligned = =248)

◆ ca_static_assert() [2/2]

ca_static_assert ( sizeof(struct SerialUARTBuf = =(5+sizeof(struct dfu_write_cmd_aligned)))

◆ RxHandled()

void RxHandled ( void  )

◆ TxReady()

void TxReady ( void  )

◆ UART_Init()

void UART_Init ( void  )

Variable Documentation

◆ gRxBuffer

struct SerialUARTBuf gRxBuffer
extern

◆ gSerialRxState

enum serial_state gSerialRxState
extern

◆ gSerialTxStalled

volatile bool gSerialTxStalled
extern

◆ gTxBuffer

struct SerialUARTBuf gTxBuffer
extern