49 #ifndef ti_drivers_uart2_UART2MSP432E4__include 50 #define ti_drivers_uart2_UART2MSP432E4__include 56 #include <ti/devices/msp432e4/inc/msp432.h> 58 #include <ti/devices/msp432e4/driverlib/gpio.h> 59 #include <ti/devices/msp432e4/driverlib/pin_map.h> 60 #include <ti/devices/msp432e4/driverlib/udma.h> 62 #include <ti/drivers/dpl/HwiP.h> 63 #include <ti/drivers/dpl/SemaphoreP.h> 78 #define UART2MSP432E4_PIN_UNASSIGNED 0xFFFFFFFF 86 #define UART2MSP432E4_DMACH_UNASSIGNED 0xFF 91 #define UART2MSP432E4_FLOWCTRL_NONE 0 96 #define UART2MSP432E4_FLOWCTRL_HARDWARE 1 101 #define UART2MSP432E4_PA0_U0RX GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTA, 0, GPIO_PA0_U0RX) 106 #define UART2MSP432E4_PA1_U0TX GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTA, 1, GPIO_PA1_U0TX) 111 #define UART2MSP432E4_PH1_U0CTS GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTH, 1, GPIO_PH1_U0CTS) 116 #define UART2MSP432E4_PM4_U0CTS GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTM, 4, GPIO_PM4_U0CTS) 121 #define UART2MSP432E4_PB4_U0CTS GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTB, 4, GPIO_PB4_U0CTS) 126 #define UART2MSP432E4_PE6_U0CTS GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTE, 6, GPIO_PE6_U0CTS) 131 #define UART2MSP432E4_PG4_U0CTS GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTG, 4, GPIO_PG4_U0CTS) 136 #define UART2MSP432E4_PH0_U0RTS GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTH, 0, GPIO_PH0_U0RTS) 141 #define UART2MSP432E4_PB5_U0RTS GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTB, 5, GPIO_PB5_U0RTS) 146 #define UART2MSP432E4_PE7_U0RTS GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTE, 7, GPIO_PE7_U0RTS) 151 #define UART2MSP432E4_PG5_U0RTS GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTG, 5, GPIO_PG5_U0RTS) 157 #define UART2MSP432E4_PB0_U1RX GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTB, 0, GPIO_PB0_U1RX) 162 #define UART2MSP432E4_PQ4_U1RX GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTQ, 4, GPIO_PQ4_U1RX) 167 #define UART2MSP432E4_PR5_U1RX GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTR, 5, GPIO_PR5_U1RX) 172 #define UART2MSP432E4_PB1_U1TX GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTB, 1, GPIO_PB1_U1TX) 177 #define UART2MSP432E4_PQ5_U1TX GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTQ, 5, GPIO_PQ5_U1TX) 182 #define UART2MSP432E4_PR6_U1TX GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTR, 6, GPIO_PR6_U1TX) 187 #define UART2MSP432E4_PP3_U1CTS GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTP, 3, GPIO_PP3_U1CTS) 192 #define UART2MSP432E4_PN1_U1CTS GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTN, 1, GPIO_PN1_U1CTS) 197 #define UART2MSP432E4_PE0_U1RTS GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTE, 0, GPIO_PE0_U1RTS) 202 #define UART2MSP432E4_PN0_U1RTS GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTN, 0, GPIO_PN0_U1RTS) 207 #define UART2MSP432E4_PN7_U1RTS GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTN, 7, GPIO_PN7_U1RTS) 213 #define UART2MSP432E4_PA6_U2RX GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTA, 6, GPIO_PA6_U2RX) 218 #define UART2MSP432E4_PD4_U2RX GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTD, 4, GPIO_PD4_U2RX) 223 #define UART2MSP432E4_PA7_U2TX GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTA, 7, GPIO_PA7_U2TX) 228 #define UART2MSP432E4_PD5_U2TX GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTD, 5, GPIO_PD5_U2TX) 233 #define UART2MSP432E4_PN3_U2CTS GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTN, 3, GPIO_PN3_U2CTS) 238 #define UART2MSP432E4_PD7_U2CTS GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTD, 7, GPIO_PD7_U2CTS) 243 #define UART2MSP432E4_PJ3_U2CTS GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTJ, 3, GPIO_PJ3_U2CTS) 248 #define UART2MSP432E4_PN2_U2RTS GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTN, 2, GPIO_PN2_U2RTS) 253 #define UART2MSP432E4_PD6_U2RTS GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTD, 6, GPIO_PD6_U2RTS) 258 #define UART2MSP432E4_PJ2_U2RTS GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTJ, 2, GPIO_PJ2_U2RTS) 264 #define UART2MSP432E4_PA4_U3RX GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTA, 4, GPIO_PA4_U3RX) 269 #define UART2MSP432E4_PJ0_U3RX GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTJ, 0, GPIO_PJ0_U3RX) 274 #define UART2MSP432E4_PA5_U3TX GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTA, 5, GPIO_PA5_U3TX) 279 #define UART2MSP432E4_PJ1_U3TX GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTJ, 1, GPIO_PJ1_U3TX) 284 #define UART2MSP432E4_PP5_U3CTS GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTP, 5, GPIO_PP5_U3CTS) 289 #define UART2MSP432E4_PN5_U3CTS GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTN, 5, GPIO_PN5_U3CTS) 294 #define UART2MSP432E4_PJ5_U3CTS GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTJ, 5, GPIO_PJ5_U3CTS) 299 #define UART2MSP432E4_PP4_U3RTS GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTP, 4, GPIO_PP4_U3RTS) 304 #define UART2MSP432E4_PN4_U3RTS GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTN, 4, GPIO_PN4_U3RTS) 309 #define UART2MSP432E4_PJ4_U3RTS GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTJ, 4, GPIO_PJ4_U3RTS) 315 #define UART2MSP432E4_PA2_U4RX GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTA, 2, GPIO_PA2_U4RX) 320 #define UART2MSP432E4_PK0_U4RX GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTK, 0, GPIO_PK0_U4RX) 325 #define UART2MSP432E4_PR1_U4RX GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTR, 1, GPIO_PR1_U4RX) 330 #define UART2MSP432E4_PA3_U4TX GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTA, 3, GPIO_PA3_U4TX) 335 #define UART2MSP432E4_PK1_U4TX GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTK, 1, GPIO_PK1_U4TX) 340 #define UART2MSP432E4_PR0_U4TX GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTR, 0, GPIO_PR0_U4TX) 345 #define UART2MSP432E4_PK3_U4CTS GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTK, 3, GPIO_PK3_U4CTS) 350 #define UART2MSP432E4_PJ7_U4CTS GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTJ, 7, GPIO_PJ7_U4CTS) 355 #define UART2MSP432E4_PN7_U4CTS GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTN, 7, GPIO_PN7_U4CTS) 360 #define UART2MSP432E4_PK2_U4RTS GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTK, 2, GPIO_PK2_U4RTS) 365 #define UART2MSP432E4_PJ6_U4RTS GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTJ, 6, GPIO_PJ6_U4RTS) 370 #define UART2MSP432E4_PN6_U4RTS GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTN, 6, GPIO_PN6_U4RTS) 376 #define UART2MSP432E4_PC6_U5RX GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTC, 6, GPIO_PC6_U5RX) 381 #define UART2MSP432E4_PH6_U5RX GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTH, 6, GPIO_PH6_U5RX) 386 #define UART2MSP432E4_PC7_U5TX GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTC, 7, GPIO_PC7_U5TX) 391 #define UART2MSP432E4_PH7_U5TX GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTH, 7, GPIO_PH7_U5TX) 397 #define UART2MSP432E4_PP0_U6RX GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTP, 0, GPIO_PP0_U6RX) 402 #define UART2MSP432E4_PP1_U6TX GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTP, 1, GPIO_PP1_U6TX) 408 #define UART2MSP432E4_PC4_U7RX GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTC, 4, GPIO_PC4_U7RX) 413 #define UART2MSP432E4_PH6_U7RX GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTH, 6, GPIO_PH6_U7RX) 418 #define UART2MSP432E4_PC5_U7TX GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTC, 5, GPIO_PC5_U7TX) 423 #define UART2MSP432E4_PH7_U7TX GPIOMSP432E4_pinConfigMask(GPIOMSP432E4_PORTH, 7, GPIO_PH7_U7TX) 429 size_t size,
size_t *bytesRead, uint32_t timeout);
432 const void *buffer,
size_t size,
size_t *bytesWritten,
UART2MSP432E4 Object.
Definition: UART2MSP432E4.h:532
UART2 Global configuration.
Definition: UART2.h:516
uint32_t rtsPin
Definition: UART2MSP432E4.h:520
const unsigned char * writeBuf
Definition: UART2MSP432E4.h:559
uint32_t txDmaChannel
Definition: UART2MSP432E4.h:524
UART2_ReadReturnMode
UART2 return mode settings.
Definition: UART2.h:373
int32_t rxStatus
Definition: UART2MSP432E4.h:543
SemaphoreP_Handle readSem
Definition: UART2MSP432E4.h:555
UDMAMSP432E4 Global configuration.
Definition: UDMAMSP432E4.h:143
size_t txSize
Definition: UART2MSP432E4.h:563
SemaphoreP_Handle writeSem
Definition: UART2MSP432E4.h:565
PRELIMINARY UART driver interface
UART2_Mode writeMode
Definition: UART2MSP432E4.h:537
uint32_t nWriteTransfers
Definition: UART2MSP432E4.h:561
uDMA driver implementation for MSP432E4.
UART2MSP432E4 Hardware attributes.
Definition: UART2MSP432E4.h:504
uint32_t nReadTransfers
Definition: UART2MSP432E4.h:551
The definition of a UART2 function table that contains the required set of functions to control a spe...
Definition: UART2.h:486
UART2_Handle UART2MSP432E4_open(uint_least8_t, UART2_Params *params)
UART2_Mode readMode
Definition: UART2MSP432E4.h:536
int32_t txStatus
Definition: UART2MSP432E4.h:544
int_fast16_t UART2MSP432E4_read(UART2_Handle handle, void *buffer, size_t size, size_t *bytesRead, uint32_t timeout)
unsigned char * readBuf
Definition: UART2MSP432E4.h:549
uint8_t intPriority
Definition: UART2MSP432E4.h:510
size_t readCount
Definition: UART2MSP432E4.h:552
int intNum
Definition: UART2MSP432E4.h:508
UART2_Callback readCallback
Definition: UART2MSP432E4.h:556
void UART2MSP432E4_writeCancel(UART2_Handle handle)
UART2_Mode
UART2 mode settings.
Definition: UART2.h:336
size_t bytesRead
Definition: UART2MSP432E4.h:554
void * userArg
Definition: UART2MSP432E4.h:545
uint32_t ctsPin
Definition: UART2MSP432E4.h:518
uint32_t flowControl
Definition: UART2MSP432E4.h:512
UART2 Parameters.
Definition: UART2.h:424
size_t writeSize
Definition: UART2MSP432E4.h:560
UART2_Callback writeCallback
Definition: UART2MSP432E4.h:566
uint32_t baseAddr
Definition: UART2MSP432E4.h:506
uint32_t rxDmaChannel
Definition: UART2MSP432E4.h:522
size_t rxSize
Definition: UART2MSP432E4.h:553
uint32_t txPin
Definition: UART2MSP432E4.h:516
UDMAMSP432E4_Handle udmaHandle
Definition: UART2MSP432E4.h:546
void UART2MSP432E4_readCancel(UART2_Handle handle)
size_t readSize
Definition: UART2MSP432E4.h:550
const UART2_FxnTable UART2MSP432E4_fxnTable
HwiP_Handle hwi
Definition: UART2MSP432E4.h:542
size_t writeCount
Definition: UART2MSP432E4.h:562
void UART2MSP432E4_flushRx(UART2_Handle handle)
void UART2MSP432E4_close(UART2_Handle handle)
unsigned int powerMgrId
Definition: UART2MSP432E4.h:569
void(* UART2_Callback)(UART2_Handle handle, void *buf, size_t count, void *userArg, int_fast16_t status)
The definition of a callback function used by the UART2 driver when used in UART2_Mode_CALLBACK The c...
Definition: UART2.h:328
size_t bytesWritten
Definition: UART2MSP432E4.h:564
uint32_t rxPin
Definition: UART2MSP432E4.h:514
int_fast16_t UART2MSP432E4_write(UART2_Handle handle, const void *buffer, size_t size, size_t *bytesWritten, uint32_t timeout)
struct UART2MSP432E4_Object * UART2MSP432E4_Handle