Functions | |
| void | UartMesMaster_Init (CySCB_Type *uart_base, TCPWM_Type *counter_base, uint32_t cntNum) |
| Initializes the UART master protocol unit. | |
| void | UartMesMaster_DeInit (void) |
| De-initializes the UART master protocol unit. | |
| uint8_t | UartMesMaster_DataProc (uint8_t address, uint8_t *txd, uint8_t tlen, uint8_t *rxd, uint8_t rlen) |
| Starts the background process of the packet's transmission. | |
| uint8_t | UartMesMaster_State (void) |
| Returns the current master unit state. | |
| uint8_t | UartMesMaster_GetDataSize (void) |
| Returns the size of the received data. | |
| void | UartMesMaster_Timeout_ISR (void) |
| UART timer guard interrupt. | |
| void | UartMesMaster_Msg_ISR (void) |
| Interrupt handler for UART to receive/transmit. | |
| void UartMesMaster_Init | ( | CySCB_Type * | uart_base, |
| TCPWM_Type * | counter_base, | ||
| uint32_t | cntNum ) |
Initializes the UART master protocol unit.
This function starts the required components and initializes the control status structure.
| uart_base | The pointer to the master UART SCB instance. |
| counter_base | The pointer to the master TCPWM instance. |
| cntNum | The Counter instance number in the selected TCPWM. |
| void UartMesMaster_DeInit | ( | void | ) |
De-initializes the UART master protocol unit.
Disables all TX/RX interrupts, flushes the FIFOs, stops the guard timer, disables the UART peripheral, and resets the internal control status structure.
| uint8_t UartMesMaster_DataProc | ( | uint8_t | address, |
| uint8_t * | txd, | ||
| uint8_t | tlen, | ||
| uint8_t * | rxd, | ||
| uint8_t | rlen ) |
Starts the background process of the packet's transmission.
| address | Slave address for data transfer. |
| txd | The pointer to transmitted data. |
| tlen | The size of transmitted data in bytes. |
| rxd | The pointer to the buffer where the received data will be stored. |
| rlen | The size of the received data buffer. |
txd and rxd buffers must remain valid and unmodified until the state becomes UM_COMPLETE or UM_ERROR.| uint8_t UartMesMaster_State | ( | void | ) |
Returns the current master unit state.
| uint8_t UartMesMaster_GetDataSize | ( | void | ) |
Returns the size of the received data.
| void UartMesMaster_Timeout_ISR | ( | void | ) |
UART timer guard interrupt.
This function provides the timeout control when data is sent but the response is not received after the packet transaction.