TMPM4KxA Group Peripheral Driver User Manual
V1.0.4.0
|
Functions | |
TXZ_Result | tspi_init (tspi_t *p_obj) |
Initialize the TSPI object. More... | |
TXZ_Result | tspi_deinit (tspi_t *p_obj) |
Release the TSPI object. More... | |
TXZ_Result | tspi_format (tspi_t *p_obj) |
Data Format setting. More... | |
TXZ_Result | tspi_master_write (tspi_t *p_obj, tspi_transmit_t *p_info, uint32_t timeout) |
Transmit data.. More... | |
TXZ_Result | tspi_master_read (tspi_t *p_obj, tspi_receive_t *p_info, uint32_t timeout) |
Receive data. Blocking Communication. More... | |
TXZ_Result | tspi_master_transfer (tspi_t *p_obj, tspi_transmit_t *p_info) |
Transmit data. Non-Blocking Communication. More... | |
TXZ_Result | tspi_master_receive (tspi_t *p_obj, tspi_receive_t *p_info) |
Receive data. Non-Blocking Communication. More... | |
void | tspi_irq_handler_transmit (tspi_t *p_obj) |
IRQ Handler for transmit. More... | |
void | tspi_irq_handler_receive (tspi_t *p_obj) |
IRQ Handler for receive. More... | |
void | tspi_error_irq_handler (tspi_t *p_obj) |
IRQ Handler for error. More... | |
TXZ_Result | tspi_get_status (tspi_t *p_obj, uint32_t *p_status) |
Get status. More... | |
TXZ_Result | tspi_get_error (tspi_t *p_obj, uint32_t *p_error) |
Get error information. More... | |
TXZ_Result | tspi_error_clear (tspi_t *p_obj) |
Error information clear. More... | |
TXZ_Result | tspi_discard_transmit (tspi_t *p_obj) |
Discard transmit. More... | |
TXZ_Result | tspi_discard_receive (tspi_t *p_obj) |
Discard receive. More... | |
TXZ_Result | tspi_dma_init (tspi_dma_t *p_obj) |
Initialize the TSPI DMA object. More... | |
TXZ_Result | tspi_dma_deinit (tspi_dma_t *p_obj) |
Release the TSPI DMA object. More... | |
TXZ_Result | tspi_dma_discard_transmit (tspi_dma_t *p_obj) |
Discard transmit. More... | |
TXZ_Result | tspi_dma_discard_receive (tspi_dma_t *p_obj) |
Discard receive. More... | |
TXZ_Result | tspi_dma_transmitIt (tspi_dma_t *p_obj, tspi_transmit_t *p_info) |
Transmit data. Non-Blocking Communication. More... | |
TXZ_Result | tspi_dma_receiveIt (tspi_dma_t *p_obj, tspi_receive_t *p_info) |
Receive data. Non-Blocking Communication. More... | |
TXZ_Result tspi_deinit | ( | tspi_t * | p_obj | ) |
Release the TSPI object.
p_obj | :TSPI object. |
TXZ_SUCCESS | :Success. |
TXZ_ERROR | :Failure. |
TXZ_Result tspi_discard_receive | ( | tspi_t * | p_obj | ) |
Discard receive.
p_obj | :TSPI object. |
TXZ_SUCCESS | :Success. |
TXZ_ERROR | :Failure. |
TXZ_Result tspi_discard_transmit | ( | tspi_t * | p_obj | ) |
Discard transmit.
p_obj | :TSPI object. |
TXZ_SUCCESS | :Success. |
TXZ_ERROR | :Failure. |
TXZ_Result tspi_dma_deinit | ( | tspi_dma_t * | p_obj | ) |
Release the TSPI DMA object.
p_obj | :TSPI DMA object. |
TXZ_SUCCESS | :Success. |
TXZ_ERROR | :Failure. |
TXZ_Result tspi_dma_discard_receive | ( | tspi_dma_t * | p_obj | ) |
Discard receive.
p_obj | :TSPI DMA object. |
TXZ_SUCCESS | :Success. |
TXZ_ERROR | :Failure. |
TXZ_Result tspi_dma_discard_transmit | ( | tspi_dma_t * | p_obj | ) |
Discard transmit.
p_obj | :TSPI DMA object. |
TXZ_SUCCESS | :Success. |
TXZ_ERROR | :Failure. |
TXZ_Result tspi_dma_init | ( | tspi_dma_t * | p_obj | ) |
Initialize the TSPI DMA object.
p_obj | :TSPI DMA object. |
TXZ_SUCCESS | :Success. |
TXZ_ERROR | :Failure. |
TXZ_Result tspi_dma_receiveIt | ( | tspi_dma_t * | p_obj, |
tspi_receive_t * | p_info | ||
) |
Receive data. Non-Blocking Communication.
p_obj | :TSPI DMA object. |
p_info | :The information of receive buffer. |
TXZ_SUCCESS | :Success. |
TXZ_ERROR | :Failure. |
TXZ_Result tspi_dma_transmitIt | ( | tspi_dma_t * | p_obj, |
tspi_transmit_t * | p_info | ||
) |
Transmit data. Non-Blocking Communication.
p_obj | :TSPI DMA object. |
p_info | :The information of transmit data. |
TXZ_SUCCESS | :Success. |
TXZ_ERROR | :Failure. |
TXZ_Result tspi_error_clear | ( | tspi_t * | p_obj | ) |
Error information clear.
Error bits.
Bit | Bit Symbol | Function |
---|---|---|
31-3 | - | - |
3 | TRGERR | Trigger Error. Use Triger Error. |
2 | UDRERR | Overrun Error. Use Underrun Error. |
1 | OVRERR | Overrun Error. Use Overrun Error. |
0 | PERR | Parity Error. Use Parity Error. |
p_obj | :TSPI object. |
TXZ_SUCCESS | :Success. |
TXZ_ERROR | :Failure. |
void tspi_error_irq_handler | ( | tspi_t * | p_obj | ) |
IRQ Handler for error.
p_obj | :TSPI object. |
- |
TXZ_Result tspi_format | ( | tspi_t * | p_obj | ) |
Data Format setting.
p_obj | :TSPI object. |
- |
TXZ_Result tspi_get_error | ( | tspi_t * | p_obj, |
uint32_t * | p_error | ||
) |
Get error information.
Error bits.
Bit | Bit Symbol | Function |
---|---|---|
31-3 | - | - |
2 | UDRERR | Overrun Error. Use Underrun Error. |
1 | OVRERR | Overrun Error. Use Overrun Error. |
0 | PERR | Parity Error. Use Parity Error. |
p_obj | :TSPI object. |
p_error | :Save area for error. |
TXZ_SUCCESS | :Success. |
TXZ_ERROR | :Failure. |
TXZ_Result tspi_get_status | ( | tspi_t * | p_obj, |
uint32_t * | p_status | ||
) |
Get status.
Status bits.
Bit | Bit Symbol | Function |
---|---|---|
31 | SUE | Setting Enable Flag. Use Status Setting Flag. |
30-24 | - | - |
23 | TXRUN | Transmitting State Flag. Use Transmitting State Flag. |
22 | TXEND | Transmitting Done Flag. Use Transmitting Complete Flag. |
21 | INTTXWF | Transmitting FIFO Interrpt Flag. Use Transmitting FIFO Interrpt Flag. |
20 | TFEMP | Transmitting FIFO Empty Flag. Use Transmitting FIFO Empty Flag. |
19-16 | TLVL | Current Transmitting FIFO Level. Current Transmitting FIFO Level. |
15-8 | - | - |
7 | RXRUN | Receive State Flag. Use Receive State Flag. |
6 | RXEND | Receive Done Flag. Use Receive Complete Flag. |
5 | INTRXFF | Receiving FIFO Interrpt Flag. Use Receiving FIFO Interrpt Flag. |
4 | RXFLL | Receiving FIFO Full Flag. Use Receiving FIFO Full Flag |
3-0 | RLVL | Current Receive FIFO Level. Use Receiving FIFO Full Flag |
p_obj | :TSPI object. |
p_status | :Save area for status. |
TXZ_SUCCESS | :Success. |
TXZ_ERROR | :Failure. |
TXZ_Result tspi_init | ( | tspi_t * | p_obj | ) |
Initialize the TSPI object.
p_obj | :TSPI object. |
TXZ_SUCCESS | :Success. |
TXZ_ERROR | :Failure. |
void tspi_irq_handler_receive | ( | tspi_t * | p_obj | ) |
IRQ Handler for receive.
p_obj | :TSPI object. |
- |
void tspi_irq_handler_transmit | ( | tspi_t * | p_obj | ) |
IRQ Handler for transmit.
p_obj | :TSPI object. |
- |
TXZ_Result tspi_master_read | ( | tspi_t * | p_obj, |
tspi_receive_t * | p_info, | ||
uint32_t | timeout | ||
) |
Receive data. Blocking Communication.
p_obj | :TSPI object. |
p_info | :The information of receive buffer. |
timeout | :Timeout duration. |
TXZ_SUCCESS | :Success. |
TXZ_ERROR | :Failure. |
TXZ_Result tspi_master_receive | ( | tspi_t * | p_obj, |
tspi_receive_t * | p_info | ||
) |
Receive data. Non-Blocking Communication.
p_obj | :TSPI object. |
p_info | :The information of receive buffer. |
SUCCESS | :Success. |
FAILURE | :Failure. |
TXZ_Result tspi_master_transfer | ( | tspi_t * | p_obj, |
tspi_transmit_t * | p_info | ||
) |
Transmit data. Non-Blocking Communication.
p_obj | :TSPI object. |
p_info | :The information of transmit data. |
SUCCESS | :Success. |
FAILURE | :Failure. |
TXZ_Result tspi_master_write | ( | tspi_t * | p_obj, |
tspi_transmit_t * | p_info, | ||
uint32_t | timeout | ||
) |
Transmit data..
p_obj | :TSPI object. |
p_info | :The information of transmit data. |
timeout | :Timeout duration. |
TXZ_SUCCESS | :Success. |
TXZ_ERROR | :Failure. |