Typedefs | |
typedef uint32_t(* | mtb_async_transfer_get_num_fifo_t) (void *inst_ref) |
Function pointer for returning the number of elements that can be read from the FIFO in case of rx or that can be written to the FIFO in case of tx. More... | |
typedef void(* | mtb_async_transfer_set_fifo_level_t) (void *inst_ref, uint32_t level) |
Function pointer to set the fifo level for triggering an interrupt when the number of elements in the FIFO exceeds(for RX) or drops below (for TX) level number of elements. More... | |
typedef void(* | mtb_async_transfer_set_enabled_t) (void *inst_ref, bool enable) |
Function pointer for enabling/disabling an RX or TX FIFO level interrupt event. More... | |
typedef uint32_t(* | mtb_async_transfer_get_len_t) (void *inst_ref) |
Function pointer for getting the RX/TX transfer length, i.e the number of elements recommended by the interface to tranmsit or receive over the peripheral in a single transfer. More... | |
typedef cy_rslt_t(* | mtb_async_transfer_dma_set_addr_t) (void *dma_ref, void *addr) |
Function pointer to set an address associated with a DMA transfer. More... | |
typedef cy_rslt_t(* | mtb_async_transfer_dma_set_len_t) (void *dma_ref, size_t len) |
Function pointer to set the length for a DMA transfer. More... | |
typedef void(* | mtb_async_transfer_event_callback_t) (void *callback_arg, mtb_async_transfer_direction_t direction) |
Async transfer callback function type. More... | |
typedef uint32_t(* | mtb_async_transfer_enter_critical_section_t) (void) |
Function pointer to disable interrupts and returns a value indicating whether the interrupts were previously enabled. More... | |
typedef void(* | mtb_async_transfer_exit_critical_section_t) (uint32_t irq_status) |
Function pointer to re-enables the interrupts if they were enabled before mtb_async_transfer_enter_critical_section_t was called. More... | |
typedef uint32_t(* mtb_async_transfer_get_num_fifo_t) (void *inst_ref) |
Function pointer for returning the number of elements that can be read from the FIFO in case of rx or that can be written to the FIFO in case of tx.
[in] | inst_ref | Pointer to the peripheral instance base address |
typedef void(* mtb_async_transfer_set_fifo_level_t) (void *inst_ref, uint32_t level) |
Function pointer to set the fifo level for triggering an interrupt when the number of elements in the FIFO exceeds(for RX) or drops below (for TX) level
number of elements.
[in] | inst_ref | Pointer to the peripheral instance base address |
[in] | level | FIFO level to set. |
typedef void(* mtb_async_transfer_set_enabled_t) (void *inst_ref, bool enable) |
Function pointer for enabling/disabling an RX or TX FIFO level interrupt event.
[in] | inst_ref | Pointer to the peripheral instance base address |
[in] | enable | true to enable the interrupt. false to disable the interrupt |
typedef uint32_t(* mtb_async_transfer_get_len_t) (void *inst_ref) |
Function pointer for getting the RX/TX transfer length, i.e the number of elements recommended by the interface to tranmsit or receive over the peripheral in a single transfer.
In case of TX, this could be half of the FIFO width In case of RX, this could be half of the FIFO width or receive flow control level if the underlying communication peripheral specifies that, for e.g. in case of UART, rx transfer length could be UART RTS FIFO level if flow control is enabled
[in] | inst_ref | Pointer to the peripheral instance base address |
return the RX/TX transfer length
typedef cy_rslt_t(* mtb_async_transfer_dma_set_addr_t) (void *dma_ref, void *addr) |
Function pointer to set an address associated with a DMA transfer.
[in] | dma_ref | Pointer to the dma instance address |
[in] | addr | Address associated with the DMA transfer |
typedef cy_rslt_t(* mtb_async_transfer_dma_set_len_t) (void *dma_ref, size_t len) |
Function pointer to set the length for a DMA transfer.
[in] | dma_ref | Pointer to the dma instance address |
[in] | len | Number of bytes to read or write |
typedef void(* mtb_async_transfer_event_callback_t) (void *callback_arg, mtb_async_transfer_direction_t direction) |
Async transfer callback function type.
[in] | callback_arg | The argument pointer specified when the callback was registered via mtb_async_transfer_register_callback |
[in] | direction | The direction (read or write) in which the transfer completed. This is a flags enum; both directions may be set at once |
typedef uint32_t(* mtb_async_transfer_enter_critical_section_t) (void) |
Function pointer to disable interrupts and returns a value indicating whether the interrupts were previously enabled.
Returns the current interrupt status
typedef void(* mtb_async_transfer_exit_critical_section_t) (uint32_t irq_status) |
Function pointer to re-enables the interrupts if they were enabled before mtb_async_transfer_enter_critical_section_t was called.
[in] | irq_status | The saved interrupts status returned by the mtb_async_transfer_enter_critical_section_t |