![]() |
S32 SDK
|
#include <stdbool.h>
#include "edma_driver.h"
#include "clock_manager.h"
#include "osif.h"
#include "status.h"
#include "callbacks.h"
Go to the source code of this file.
Data Structures | |
struct | lpspi_state_t |
Runtime state structure for the LPSPI master driver. More... | |
Enumerations | |
enum | lpspi_which_pcs_t { LPSPI_PCS0 = 0U, LPSPI_PCS1 = 1U, LPSPI_PCS2 = 2U, LPSPI_PCS3 = 3U } |
LPSPI Peripheral Chip Select (PCS) configuration (which PCS to configure). Implements : lpspi_which_pcs_t_Class. More... | |
enum | lpspi_signal_polarity_t { LPSPI_ACTIVE_HIGH = 1U, LPSPI_ACTIVE_LOW = 0U } |
LPSPI Signal (PCS and Host Request) Polarity configuration. Implements : lpspi_signal_polarity_t_Class. More... | |
enum | lpspi_clock_phase_t { LPSPI_CLOCK_PHASE_1ST_EDGE = 0U, LPSPI_CLOCK_PHASE_2ND_EDGE = 1U } |
LPSPI clock phase configuration. Implements : lpspi_clock_phase_t_Class. More... | |
enum | lpspi_sck_polarity_t { LPSPI_SCK_ACTIVE_HIGH = 0U, LPSPI_SCK_ACTIVE_LOW = 1U } |
LPSPI Clock Signal (SCK) Polarity configuration. Implements : lpspi_sck_polarity_t_Class. More... | |
enum | lpspi_transfer_type { LPSPI_USING_DMA = 0, LPSPI_USING_INTERRUPTS } |
Type of LPSPI transfer (based on interrupts or DMA). Implements : lpspi_transfer_type_Class. More... | |
enum | transfer_status_t { LPSPI_TRANSFER_OK = 0U, LPSPI_TRANSMIT_FAIL, LPSPI_RECEIVE_FAIL } |
Type of error reported by LPSPI. More... | |
Functions | |
void | LPSPI_DRV_IRQHandler (uint32_t instance) |
The function LPSPI_DRV_IRQHandler passes IRQ control to either the master or slave driver. More... | |
void | LPSPI_DRV_FillupTxBuffer (uint32_t instance) |
The function LPSPI_DRV_FillupTxBuffer writes data in TX hardware buffer depending on driver state and number of bytes remained to send. More... | |
void | LPSPI_DRV_ReadRXBuffer (uint32_t instance) |
The function LPSPI_DRV_ReadRXBuffer reads data from RX hardware buffer and writes this data in RX software buffer. More... | |
void | LPSPI_DRV_DisableTEIEInterrupts (uint32_t instance) |
Disable the TEIE interrupts at the end of a transfer. Disable the interrupts and clear the status for transmit/receive errors. More... | |
Non-blocking transfers | |
void | LPSPI_DRV_MasterIRQHandler (uint32_t instance) |
Interrupt handler for LPSPI master mode. This handler uses the buffers stored in the lpspi_master_state_t structs to transfer data. More... | |
Non-blocking transfers | |
void | LPSPI_DRV_SlaveIRQHandler (uint32_t instance) |
Interrupt handler for LPSPI slave mode. This handler uses the buffers stored in the lpspi_master_state_t structs to transfer data. More... | |
Variables | |
LPSPI_Type * | g_lpspiBase [LPSPI_INSTANCE_COUNT] |
Table of base pointers for SPI instances. More... | |
IRQn_Type | g_lpspiIrqId [LPSPI_INSTANCE_COUNT] |
Table to save LPSPI IRQ enumeration numbers defined in the CMSIS header file. More... | |
lpspi_state_t * | g_lpspiStatePtr [LPSPI_INSTANCE_COUNT] |