Trident IoT SDK
 
Loading...
Searching...
No Matches
T32CM11_uart.h
Go to the documentation of this file.
1
54
55#ifndef T32CM11_UART_H_
56#define T32CM11_UART_H_
57
58#include "tr_hal_platform.h"
59#include "tr_hal_gpio.h"
60
66
67
71
72// the T32CM11 has 3 UARTs available for configuration
73// this is a chip constraint - can't change it
74#define TR_NUMBER_OF_UARTS 3
75
76// UART IDs
77typedef enum
78{
82
84
85// threshhold of bytes left in DMA buffer to notify user
86// this is a software setting, it can be adjusted
87#define LOW_BYTES_BUFFER_THRESHHOLD 16
88
89// the maximum size buffer the raw tx API can take in to transmit
90// this is a software setting, it can be adjusted
91// if adjusting, note we keep this x 3 UARTs in RAM
92#define MAX_RAW_TX_DATA_BUFFER_SIZE 256
93
94// if using a DMA buffer we enforce a minimum size
95// this is a software setting, and current set to equal the FIFO RX size
96#define DMA_RX_BUFF_MINIMUM_SIZE 16
97
98// size of transmit FIFO.
99// this is a chip constraint - can't change it
100#define TX_FIFO_SIZE 16
101
102// default interrupt priority for UART
103//#define UART_DEFAULT_INTERRUPT_PRIORITY TR_HAL_INTERRUPT_PRIORITY_5
104
105
130
131#define UART_INVALID_PIN 0xFF
132
133// we define the valid choices for UART TX and RX pins so these can be used
134// in other parts of the code.
135// any combination of RX and TX works (these are not in PAIRS)
136
137// UART1 has just 1 option
138#define UART0_TX_PIN_OPTION1 17
139#define UART0_RX_PIN_OPTION1 16
140
141// UART2 normally has 3 options but OPTION2 is not available on this chip
142// left these defines in here to prevent confusion - someone trying to figure
143// out why these pins are not supported
144#define UART1_TX_PIN_OPTION1 4
145#define UART1_RX_PIN_OPTION1 5
146//#define UART1_TX_PIN_OPTION2 10
147//#define UART1_RX_PIN_OPTION2 11
148#define UART1_TX_PIN_OPTION3 28
149#define UART1_RX_PIN_OPTION3 29
150
151// RTS/CTS pin options
152#define UART1_RTS_PIN_OPTION1 14
153#define UART1_CTS_PIN_OPTION1 15
154
155#define UART1_RTS_PIN_OPTION2 20
156#define UART1_CTS_PIN_OPTION2 21
157
158
159// UART3 normally has 3 options but OPTION2 is not available on this chip
160// left these defines in here to prevent confusion - someone trying to figure
161// out why these pins are not supported
162#define UART2_TX_PIN_OPTION1 6
163#define UART2_RX_PIN_OPTION1 7
164//#define UART2_TX_PIN_OPTION2 12
165//#define UART2_RX_PIN_OPTION2 13
166#define UART2_TX_PIN_OPTION3 30
167#define UART2_RX_PIN_OPTION3 31
168
169#define TR_HAL_PIN_NOT_SET 255
170
171
180#define CHIP_MEMORY_MAP_UART0_BASE (0xA0000000UL)
181#define CHIP_MEMORY_MAP_UART1_BASE (0xA0500000UL)
182#define CHIP_MEMORY_MAP_UART2_BASE (0xA0600000UL)
183
184
188typedef struct
189{
190 __IO uint32_t receive_buffer_register; // 0x00 = RBR
191 __IO uint32_t interrupt_enable_register; // 0x04 = IER
192 __IO uint32_t FIFO_control_register; // 0x08 = FCR
193 __IO uint32_t line_control_register; // 0x0C = LCR
194 __IO uint32_t modem_control_register; // 0x10 = MCR
195 __I uint32_t line_status_register; // 0x14 = LSR
196 __I uint32_t modem_status_register; // 0x18 = MSR
197 __IO uint32_t scratch_register; // 0x1C = SCR (not used)
198
199 // setup for DMA RX
200 __IO uint32_t DMA_rx_buffer_addr; //0x20
201 __IO uint32_t DMA_rx_buffer_len; //0x24
202
203 // setup for DMA TX
204 __IO uint32_t DMA_tx_buffer_addr; //0x28
205 __IO uint32_t DMA_tx_buffer_len; //0x2C
206
207 // using DMA
208 __I uint32_t DMA_rx_xfer_len_remaining; //0x30
209 __I uint32_t DMA_tx_xfer_len_remaining; //0x34
210 __IO uint32_t DMA_interrupt_enable_register; //0x38
211 __IO uint32_t DMA_interrupt_status; //0x3C
212 __IO uint32_t DMA_rx_enable; //0x40
213 __IO uint32_t DMA_tx_enable; //0x44
214
216
217
218// *****************************************************************
219// *** some registers are multi-purpose:
220
221// at register address 0x00, a read pulls data from RBR (read-buffer),
222// while a write puts a byte in the THR (transmitter-holder)
223#define transmitter_holding_register receive_buffer_register
224
225// at register address 0x08, a read pulls data from IIR(interrupt-identification),
226// while a write puts a byte in the FCR (FIFO control)
227#define interrupt_identification_register FIFO_control_register
228
229// the divisor latch low byte is set in register 0x00, same as RBR and THR
230// to write this the LCR must have the divisor latch access bit set
231// if that is not set, then we are setting a transmit byte
232#define divisor_latch_LSB receive_buffer_register
233
234// the divisor latch low byte is set in register 0x04, same as IER
235// to write this the LCR must have the divisor latch access bit set
236// if that is not set, then we are setting the interrupt enable register
237#define divisor_latch_MSB interrupt_enable_register
238
239
240// *****************************************************************
241// this orients the 3 structs (for 3 UARTs) with the correct addresses
242// so referencing a field will now read/write the correct chip address
243// *****************************************************************
244#define UART0_CHIP_REGISTERS ((UART_REGISTERS_T *) CHIP_MEMORY_MAP_UART0_BASE)
245#define UART1_CHIP_REGISTERS ((UART_REGISTERS_T *) CHIP_MEMORY_MAP_UART1_BASE)
246#define UART2_CHIP_REGISTERS ((UART_REGISTERS_T *) CHIP_MEMORY_MAP_UART2_BASE)
247
248// *****************************************************************
249// these defines help when dealing with the INTERRUPT ENABLE REGISTER (0x04)
250#define IER_ENABLE_RECEIVE_DATA_AVAIL_INT 0x01
251#define IER_ENABLE_READY_TO_TRANSMIT_INT 0x02
252#define IER_ENABLE_FRAMING_PARITY_OVERRUN_ERROR_INT 0x04
253#define IER_ENABLE_MODEM_STATUS_INT 0x08
254
255// *****************************************************************
256// these defines help when dealing with the FIFO CONTROL REGISTER (0x08)
257#define FCR_FIFO_ENABLE 0x01
258#define FCR_CLEAR_RECEIVER 0x02
259#define FCR_CLEAR_TRANSMIT 0x04
260#define FCR_DMA_SELECT 0x08
261
262#define FCR_TRIGGER_MASK 0xC0
263
264// values we can trigger on
274
275
276// *****************************************************************
277// these defines help when dealing with the INTERRUPT IDENTIFICATION REGISTER (0x08)
278// we have an interrupt
279// need to mask out the top 4 bits as only the bottom 4 bits are the interrupt
280#define IIR_INTERRUPT_MASK 0x0F
281// all of these assume that the MASK has already been applied.
282// we can only get one of these at a time so we can compare by VALUE and not BIT
283#define IIR_NO_INTERRUPT_PENDING 0x01
284#define IIR_MODEM_STATUS_INTERRUPT 0x00
285#define IIR_THR_EMPTY_INTERRUPT 0x02
286#define IIR_RECEIVER_ERROR_INTERRUPT 0x06
287#define IIR_RX_DATA_AVAIL_INTERRUPT 0x04
288#define IIR_CHAR_TIMEOUT_INTERRUPT 0x0C
289
290// *****************************************************************
291// these defines to help when dealing with the LINE CONTROL REGISTER (0x0C)
292// bits 0, 1 set the data bits: 00=5, 01=6, 10=7, 11=8
293// bit 2 sets the stop bits: 0=1 stop bit, 1=2 stop bits
294// bit 3, 4 set the parity: 00=no parity 10=no parity, 01=odd parity, 11=even parity,
295// bit 5 sets the sticky parity -> for debug
296// bit 6 sets break -> for debug
297// bit 7 sets the divisior latch access - when set to 1 this changes
298// the RBR and IER registers to be the divisor latch bytes which
299// sets the baud rate
300#define LCR_DATA_BITS_MASK 0x03
301#define LCR_DATA_BITS_INV_MASK 0xFC
302#define LCR_STOP_BITS_MASK 0x04
303#define LCR_STOP_BITS_INV_MASK 0xFB
304#define LCR_PARITY_BITS_MASK 0x18
305#define LCR_PARITY_BITS_INV_MASK 0xE7
306#define LCR_BAUD_RATE_SETTING_MASK 0x80
307
308// bits 0, 1 set the data-bits: 0b00=5 data-bits, 0b01=6 data-bits, 0b10=7 data-bits, 0b11=8 data-bits
309// these values come from the chip register and cannot be changed
319
320
321// bit 2 sets the stop bits: 0b0=1 stop bit, 0b1=2 stop bits
322// these values come from the chip register and cannot be changed
330
331
332// bit 3, 4 set the parity: 0b00=no parity 0b10=no parity, 0b01=odd parity, 0b11=even parity,
333// these values come from the chip register and cannot be changed
342
343
344// *****************************************************************
345// helper enum for MODEM CONTROL REGISTER (0x10)
346// the modem control register controls the HW flow control
355
356
357// *****************************************************************
358// helper defines for LINE STATUS REGISTER (0x14)
359// see section 10.3.8
360// bit 0 set means data ready
361#define LSR_DATA_READY 0x01
362// bit 1 is set when an incoming character over writes a waiting character
363#define LSR_OVERRUN_ERROR 0x02
364// bit 2 is the parity error
365#define LSR_PARITY_ERROR 0x04
366// bit 3 is framing error
367#define LSR_FRAMING_ERROR 0x08
368// bit 4 is the break interrupt
369#define LSR_BREAK_INDICATOR 0x10
370// bit 5 is THR empty. behavior is different if FIFOs are enabled - see 10.3.8
371// if FIFO is enabled, then this is CLEAR (0) when FIFO is empty
372// if FIFO is disabled, then this is CLEAR (0) when THR is empty (so it can be used again)
373#define LSR_TRANSMITTER_HOLDING_REG_EMPTY 0x20
374// bit 6 is SET(1) when THR is empty and ready to accept characters (in both FIFO and non-FIFO mode)
375#define LSR_TRANSMITTER_EMPTY 0x40
376// bit 7 is FIFO error
377#define LSR_FIFO_ERROR 0x80
378
379// *****************************************************************
380// helper defines for MODEM STATUS REGISTER (0x18)
381#define MSR_DCTS 0x01
382#define MSR_DDSR 0x02
383#define MSR_TERI 0x04
384#define MSR_DDCD 0x08
385#define MSR_CTS 0x10
386#define MSR_DSR 0x20
387#define MSR_RI 0x40
388#define MSR_DCD 0x80
389
390// *****************************************************************
391// helper defines for DMA INTERRUPT ENABLE REGISTER (0x38)
392#define DMA_IER_ENABLE_RECEIVE_INT 0x01
393#define DMA_IER_ENABLE_TRANSMIT_INT 0x02
394
395// *****************************************************************
396// helper defines for DMA INTERRUPT STATUS (0x3C)
397#define DMA_RECEIVE_INTERRUPT 0x01
398#define DMA_TRANSMIT_INTERRUPT 0x02
399
400// *****************************************************************
401// helper defines for DMA_rx_enable (0x40) and DMA_tx_enable(0x44) REGISTERs
402#define UART_DMA_ENABLE 0x01
403#define UART_DMA_DISABLE 0x00
404
405
406// *****************************************************************
407// baud rates - these are chip specific and cannot be changed
426
427
442
443
444// prototype for callback from the Trident HAL to the app when a byte is received
445typedef void (*tr_hal_uart_receive_callback_t) (uint8_t received_byte);
446
447// prototype for callback from the Trident HAL to the app when an event happens
448typedef void (*tr_hal_uart_event_callback_t) (uint32_t event_bitmask);
449
450
469typedef struct
470{
471 // **** GPIO pins for UART ****
472
473 // TX and RX pin
476
477 // for hardware flow control - note that ONLY UART1 can do this
481
482
483 // **** protocol settings ****
484
485 // use the TR_HAL_UART_BAUD_RATE_xxx defines to set this
487
488 // these use the same bits as LCR - use the LCR defines to set these
492
493 // **** DMA settings ****
494
497 // note: buffer must STAY allocated
500
501
502 // **** non-DMA transmit ****
503
504 // if transmit is not done with DMA, then the app needs to allocate a
505 // transmit buffer and set a pointer to that transmit buffer here
508
509
510 // **** receive and event handler functions ****
511
512 // callback from HAL to App when a byte is received
513 // if the app doesn't want this, then set it to NULL
515
516 // callback from HAL to App when an event happens
517 // if the app doesn't want this, then set it to NULL
519
520
521 // **** chip behavior settings ****
522
523 // how many bytes before chip triggers the user function: 1, 4, 8, 12, or 0 (never)
524 // default and suggested value is 1
526
527 // are the chip interrupts enabled?
529
530 // set the INT priority
532
533 // when the UART is powered off we can choose to DISABLE interrupts, meaning
534 // we will STAY powered off even when events are happening, or we can choose
535 // to KEEP interrupts enabled when powered off. This means we would wake on
536 // interrupt and power the UART back on
538
539 // don't include UART power setting in the config
540 // uart_init puts the UART in the powered on state
541 // uart_power will change the power setting
542
544
545
546// ************************************************************
547// default values so an app can quickly load a reasonable set of values
548// and then make any changes necessary
549//
550// this sets up for 115200 8-n-1, no DMA, and a default interrupt and
551// receive function that can be overridden in the users application
552//
553// ************************************************************
554#define DEFAULT_UART0_CONFIG \
555 { \
556 .tx_pin = (tr_hal_gpio_pin_t) { UART0_TX_PIN_OPTION1 }, \
557 .rx_pin = (tr_hal_gpio_pin_t) { UART0_RX_PIN_OPTION1 }, \
558 .hardware_flow_control_enabled = false, \
559 .rts_pin = (tr_hal_gpio_pin_t) { TR_HAL_PIN_NOT_SET }, \
560 .cts_pin = (tr_hal_gpio_pin_t) { TR_HAL_PIN_NOT_SET }, \
561 .baud_rate = TR_HAL_UART_BAUD_RATE_115200, \
562 .data_bits = LCR_DATA_BITS_8_VALUE, \
563 .stop_bits = LCR_STOP_BITS_ONE_VALUE, \
564 .parity = LCR_PARITY_NONE_VALUE, \
565 .rx_dma_enabled = false, \
566 .tx_dma_enabled = false, \
567 .rx_dma_buffer = NULL, \
568 .rx_dma_buff_length = 0, \
569 .raw_tx_buffer = NULL, \
570 .raw_tx_buff_length = 0, \
571 .rx_handler_function = NULL, \
572 .rx_bytes_before_trigger = FCR_TRIGGER_1_BYTE, \
573 .enable_chip_interrupts = true, \
574 .interrupt_priority = TR_HAL_INTERRUPT_PRIORITY_5, \
575 .wake_on_interrupt = false, \
576 .event_handler_fx = NULL, \
577 }
578
579#define DEFAULT_UART1_CONFIG \
580 { \
581 .tx_pin = (tr_hal_gpio_pin_t) { UART1_TX_PIN_OPTION1 }, \
582 .rx_pin = (tr_hal_gpio_pin_t) { UART1_RX_PIN_OPTION1 }, \
583 .hardware_flow_control_enabled = false, \
584 .rts_pin = (tr_hal_gpio_pin_t) { TR_HAL_PIN_NOT_SET }, \
585 .cts_pin = (tr_hal_gpio_pin_t) { TR_HAL_PIN_NOT_SET }, \
586 .baud_rate = TR_HAL_UART_BAUD_RATE_115200, \
587 .data_bits = LCR_DATA_BITS_8_VALUE, \
588 .stop_bits = LCR_STOP_BITS_ONE_VALUE, \
589 .parity = LCR_PARITY_NONE_VALUE, \
590 .rx_dma_enabled = false, \
591 .tx_dma_enabled = false, \
592 .rx_dma_buffer = NULL, \
593 .rx_dma_buff_length = 0, \
594 .raw_tx_buffer = NULL, \
595 .raw_tx_buff_length = 0, \
596 .rx_handler_function = NULL, \
597 .rx_bytes_before_trigger = FCR_TRIGGER_1_BYTE, \
598 .enable_chip_interrupts = true, \
599 .interrupt_priority = TR_HAL_INTERRUPT_PRIORITY_5, \
600 .wake_on_interrupt = false, \
601 .event_handler_fx = NULL, \
602 }
603
604#define DEFAULT_UART2_CONFIG \
605 { \
606 .tx_pin = (tr_hal_gpio_pin_t) { UART2_TX_PIN_OPTION1 }, \
607 .rx_pin = (tr_hal_gpio_pin_t) { UART2_RX_PIN_OPTION1 }, \
608 .hardware_flow_control_enabled = false, \
609 .rts_pin = (tr_hal_gpio_pin_t) { TR_HAL_PIN_NOT_SET }, \
610 .cts_pin = (tr_hal_gpio_pin_t) { TR_HAL_PIN_NOT_SET }, \
611 .baud_rate = TR_HAL_UART_BAUD_RATE_115200, \
612 .data_bits = LCR_DATA_BITS_8_VALUE, \
613 .stop_bits = LCR_STOP_BITS_ONE_VALUE, \
614 .parity = LCR_PARITY_NONE_VALUE, \
615 .rx_dma_enabled = false, \
616 .tx_dma_enabled = false, \
617 .rx_dma_buffer = NULL, \
618 .rx_dma_buff_length = 0, \
619 .raw_tx_buffer = NULL, \
620 .raw_tx_buff_length = 0, \
621 .rx_handler_function = NULL, \
622 .rx_bytes_before_trigger = FCR_TRIGGER_1_BYTE, \
623 .enable_chip_interrupts = true, \
624 .interrupt_priority = TR_HAL_INTERRUPT_PRIORITY_5, \
625 .wake_on_interrupt = false, \
626 .event_handler_fx = NULL, \
627 }
628
629
635#define TR_HAL_UART_EVENT_DMA_TX_COMPLETE 0x00000001
636#define TR_HAL_UART_EVENT_DMA_RX_BUFFER_LOW 0x00000002
637#define TR_HAL_UART_EVENT_DMA_RX_TO_USER_FX 0x00000004
638#define TR_HAL_UART_EVENT_DMA_RX_READY 0x00000008
639#define TR_HAL_UART_EVENT_TX_COMPLETE 0x00000010
640#define TR_HAL_UART_EVENT_TX_STILL_GOING 0x00000020
641#define TR_HAL_UART_EVENT_RX_TO_USER_FX 0x00000040
642#define TR_HAL_UART_EVENT_RX_READY 0x00000080
643#define TR_HAL_UART_EVENT_RX_ENDED_TO_USER_FX 0x00000100
644#define TR_HAL_UART_EVENT_RX_ENDED_NO_DATA 0x00000200
645#define TR_HAL_UART_EVENT_RX_MAYBE_READY 0x00000400
646#define TR_HAL_UART_EVENT_RX_ERR_OVERRUN 0x00000800
647#define TR_HAL_UART_EVENT_RX_ERR_PARITY 0x00001000
648#define TR_HAL_UART_EVENT_RX_ERR_FRAMING 0x00002000
649#define TR_HAL_UART_EVENT_RX_ERR_BREAK 0x00004000
650#define TR_HAL_UART_EVENT_HW_FLOW_CONTROL 0x00008000
651#define TR_HAL_UART_EVENT_UNEXPECTED 0x00010000
652
653
657
658
659#endif // T32CM11_UART_H_
This file contains the CHIP SPECIFIC types and defines for the T32CM11.
tr_hal_int_pri_t
values and a range checking function for setting the interrupt priority in the Trident HAL APIs
Definition tr_hal_platform.h:34
tr_hal_data_bits_t
Definition T32CM11_uart.h:311
tr_hal_baud_rate_t
Definition T32CM11_uart.h:409
tr_hal_parity_t
Definition T32CM11_uart.h:335
UART_REGISTERS_T * tr_hal_uart_get_uart_register_address(tr_hal_uart_id_t uart_id)
void(* tr_hal_uart_receive_callback_t)(uint8_t received_byte)
Definition T32CM11_uart.h:445
tr_hal_hw_fc_t
Definition T32CM11_uart.h:348
tr_hal_stop_bits_t
Definition T32CM11_uart.h:324
tr_hal_fifo_trigger_t
Definition T32CM11_uart.h:266
tr_hal_uart_id_t
Definition T32CM11_uart.h:78
void(* tr_hal_uart_event_callback_t)(uint32_t event_bitmask)
Definition T32CM11_uart.h:448
@ LCR_DATA_BITS_7_VALUE
Definition T32CM11_uart.h:314
@ LCR_DATA_BITS_INVALID_VALUE
Definition T32CM11_uart.h:316
@ LCR_DATA_BITS_6_VALUE
Definition T32CM11_uart.h:313
@ LCR_DATA_BITS_5_VALUE
Definition T32CM11_uart.h:312
@ LCR_DATA_BITS_8_VALUE
Definition T32CM11_uart.h:315
@ TR_HAL_UART_BAUD_RATE_1000000
Definition T32CM11_uart.h:421
@ TR_HAL_UART_BAUD_RATE_115200
Definition T32CM11_uart.h:419
@ TR_HAL_UART_BAUD_RATE_ERROR
Definition T32CM11_uart.h:423
@ TR_HAL_UART_BAUD_RATE_57600
Definition T32CM11_uart.h:417
@ TR_HAL_UART_BAUD_RATE_500000
Definition T32CM11_uart.h:420
@ TR_HAL_UART_BAUD_RATE_2400
Definition T32CM11_uart.h:410
@ TR_HAL_UART_BAUD_RATE_76800
Definition T32CM11_uart.h:418
@ TR_HAL_UART_BAUD_RATE_19200
Definition T32CM11_uart.h:414
@ TR_HAL_UART_BAUD_RATE_9600
Definition T32CM11_uart.h:412
@ TR_HAL_UART_BAUD_RATE_28800
Definition T32CM11_uart.h:415
@ TR_HAL_UART_BAUD_RATE_4800
Definition T32CM11_uart.h:411
@ TR_HAL_UART_BAUD_RATE_14400
Definition T32CM11_uart.h:413
@ TR_HAL_UART_BAUD_RATE_38400
Definition T32CM11_uart.h:416
@ TR_HAL_UART_BAUD_RATE_2000000
Definition T32CM11_uart.h:422
@ LCR_PARITY_EVEN_VALUE
Definition T32CM11_uart.h:338
@ LCR_PARITY_NONE_VALUE
Definition T32CM11_uart.h:336
@ LCR_PARITY_ODD_VALUE
Definition T32CM11_uart.h:337
@ LCR_PARITY_INVALID_VALUE
Definition T32CM11_uart.h:339
@ MCR_SET_CTS_ENABLED
Definition T32CM11_uart.h:352
@ MCR_SET_DTR_READY
Definition T32CM11_uart.h:350
@ MCR_NO_FLOW_CONTROL_VALUE
Definition T32CM11_uart.h:349
@ MCR_SET_RTS_READY
Definition T32CM11_uart.h:351
@ LCR_STOP_BITS_TWO_VALUE
Definition T32CM11_uart.h:326
@ LCR_STOP_BITS_ONE_VALUE
Definition T32CM11_uart.h:325
@ LCR_STOP_BITS_INVALID_VALUE
Definition T32CM11_uart.h:327
@ FCR_TRIGGER_14_BYTES
Definition T32CM11_uart.h:270
@ FCR_TRIGGER_8_BYTES
Definition T32CM11_uart.h:269
@ FCR_NO_TRIGGER
Definition T32CM11_uart.h:271
@ FCR_TRIGGER_4_BYTES
Definition T32CM11_uart.h:268
@ FCR_TRIGGER_1_BYTE
Definition T32CM11_uart.h:267
@ UART_0_ID
Definition T32CM11_uart.h:79
@ UART_2_ID
Definition T32CM11_uart.h:81
@ UART_1_ID
Definition T32CM11_uart.h:80
tr_hal_data_bits_t
Definition T32CZ20_uart.h:173
tr_hal_baud_rate_t
Definition T32CZ20_uart.h:440
tr_hal_parity_t
Definition T32CZ20_uart.h:197
tr_hal_stop_bits_t
Definition T32CZ20_uart.h:186
tr_hal_fifo_trigger_t
values we can trigger on for receive FIFO
Definition T32CZ20_uart.h:160
Definition T32CM11_uart.h:189
__IO uint32_t DMA_tx_enable
Definition T32CM11_uart.h:213
__IO uint32_t receive_buffer_register
Definition T32CM11_uart.h:190
__IO uint32_t DMA_interrupt_status
Definition T32CM11_uart.h:211
__I uint32_t DMA_tx_xfer_len_remaining
Definition T32CM11_uart.h:209
__I uint32_t modem_status_register
Definition T32CM11_uart.h:196
__IO uint32_t line_control_register
Definition T32CM11_uart.h:193
__IO uint32_t DMA_interrupt_enable_register
Definition T32CM11_uart.h:210
__IO uint32_t DMA_rx_buffer_len
Definition T32CM11_uart.h:201
__IO uint32_t interrupt_enable_register
Definition T32CM11_uart.h:191
__IO uint32_t DMA_rx_enable
Definition T32CM11_uart.h:212
__IO uint32_t DMA_rx_buffer_addr
Definition T32CM11_uart.h:200
__IO uint32_t DMA_tx_buffer_len
Definition T32CM11_uart.h:205
__IO uint32_t FIFO_control_register
Definition T32CM11_uart.h:192
__I uint32_t DMA_rx_xfer_len_remaining
Definition T32CM11_uart.h:208
__I uint32_t line_status_register
Definition T32CM11_uart.h:195
__IO uint32_t modem_control_register
Definition T32CM11_uart.h:194
__IO uint32_t DMA_tx_buffer_addr
Definition T32CM11_uart.h:204
__IO uint32_t scratch_register
Definition T32CM11_uart.h:197
pin type
Definition tr_hal_platform.h:23
Definition T32CM11_uart.h:470
tr_hal_gpio_pin_t rts_pin
Definition T32CM11_uart.h:479
tr_hal_parity_t parity
Definition T32CM11_uart.h:491
bool wake_on_interrupt
Definition T32CM11_uart.h:537
tr_hal_data_bits_t data_bits
Definition T32CM11_uart.h:489
tr_hal_uart_receive_callback_t rx_handler_function
Definition T32CM11_uart.h:514
uint8_t * raw_tx_buffer
Definition T32CM11_uart.h:506
tr_hal_stop_bits_t stop_bits
Definition T32CM11_uart.h:490
tr_hal_gpio_pin_t tx_pin
Definition T32CM11_uart.h:474
uint8_t * rx_dma_buffer
Definition T32CM11_uart.h:498
bool tx_dma_enabled
Definition T32CM11_uart.h:496
tr_hal_uart_event_callback_t event_handler_fx
Definition T32CM11_uart.h:518
tr_hal_gpio_pin_t cts_pin
Definition T32CM11_uart.h:480
tr_hal_fifo_trigger_t rx_bytes_before_trigger
Definition T32CM11_uart.h:525
bool enable_chip_interrupts
Definition T32CM11_uart.h:528
uint16_t raw_tx_buff_length
Definition T32CM11_uart.h:507
tr_hal_int_pri_t interrupt_priority
Definition T32CM11_uart.h:531
bool hardware_flow_control_enabled
Definition T32CM11_uart.h:478
tr_hal_gpio_pin_t rx_pin
Definition T32CM11_uart.h:475
tr_hal_baud_rate_t baud_rate
Definition T32CM11_uart.h:486
uint16_t rx_dma_buff_length
Definition T32CM11_uart.h:499
bool rx_dma_enabled
Definition T32CM11_uart.h:495
This is the common include file for the Trident HAL GPIO Driver.