DSPI Peripheral
Bootloader » Peripheral Definitions

DSPI peripheral interface. More...

Collaboration diagram for DSPI Peripheral:

## Data Structures

struct | dspi_transfer_info_t
| Synchronization state between DSPI ISR and read/write functions. More...

## Functions

static bool | dspi_poll_for_activity (const peripheral_descriptor_t *self)
| DSPI slave poll for activity function.
static status_t | dspi_full_init (const peripheral_descriptor_t *self, serial_byte_receive_func_t function)
| DSPI slave init function.
static void | dspi_full_shutdown (const peripheral_descriptor_t *self)
| DSPI slave shutdown function.
static void | dspi_data_source (uint8_t *source_byte)
| DSPI slave sending data function.
static void | dspi_data_sink (uint8_t sink_byte, uint32_t instance)
| DSPI slave receiving data function.
static void | dspi_initial_data_sink (uint8_t sink_byte, uint32_t instance)
| DSPI slave receiving first byte data function.
status_t | dspi_write (const peripheral_descriptor_t *self, const uint8_t *buffer, uint32_t byteCount)
| DSPI slave writing data function.
void | dspi_slave_irq_handler (uint32_t instance)
void | SPI0_IRQHandler (void)
void | SPI1_IRQHandler (void)
void | SPI2_IRQHandler (void)

## Variables

const peripheral_control_interface_t | g_dspiControlInterface
| DSPI slave control interface information. More...
const peripheral_byte_inteface_t | g_dspiByteInterface = {.init = NULL, .write = dspi_write }
| DSPI slave byte interface information. More...
static dspi_transfer_info_t | s_dspiInfo
| Global state for the DSPI slave peripheral interface. More...
static bool | s_dspiActivity [FSL_FEATURE_SOC_DSPI_COUNT] = { false }
| Flag for DSPI detecting device activity.
static bool | s_dspiIntialized [FSL_FEATURE_SOC_DSPI_COUNT] = { false }
| Flag for DSPI intialization state.
static serial_byte_receive_func_t | s_dspi_app_data_sink_callback
| DSPI slave receiving data call back function.
static const uint32_t | g_dspiBaseAddr [] = SPI_BASE_ADDRS

## Usage Information

DSPI peripheral interface.

## Data Structure Documentation

struct dspi_transfer_info_t

Synchronization state between DSPI ISR and read/write functions.

### Data Fields

const uint8_t * | writeData
| The applications data to write.
volatile uint32_t | bytesToTransfer
| The total number of bytes to be transmitted.
void(* | data_source )(uint8_t *source_byte)
void(* | data_sink )(uint8_t sink_byte, uint32_t instance)

## Variable Documentation

const peripheral_byte_inteface_t g_dspiByteInterface = {.init = NULL, .write = dspi_write }

DSPI slave byte interface information.

Byte I/O interface for the DSPI peripheral driver.

const peripheral_control_interface_t g_dspiControlInterface

Initial value:
= {
.pollForActivity = dspi_poll_for_activity, .init = dspi_full_init, .shutdown = dspi_full_shutdown, .pump = 0
}
dspi_full_init
static status_t dspi_full_init(const peripheral_descriptor_t *self, serial_byte_receive_func_t function)
DSPI slave init function.
Definition: dspi_peripheral_interface.c:180
dspi_full_shutdown
static void dspi_full_shutdown(const peripheral_descriptor_t *self)
DSPI slave shutdown function.
Definition: dspi_peripheral_interface.c:210
dspi_poll_for_activity
static bool dspi_poll_for_activity(const peripheral_descriptor_t *self)
DSPI slave poll for activity function.
Definition: dspi_peripheral_interface.c:121

DSPI slave control interface information.

Control interface for the DSPI peripheral driver.

dspi_transfer_info_t s_dspiInfo

static

Initial value:
= {
.writeData = 0, .bytesToTransfer = 0, .data_source = dspi_data_source, .data_sink = dspi_initial_data_sink
}
dspi_data_source
static void dspi_data_source(uint8_t *source_byte)
DSPI slave sending data function.
Definition: dspi_peripheral_interface.c:132
dspi_initial_data_sink
static void dspi_initial_data_sink(uint8_t sink_byte, uint32_t instance)
DSPI slave receiving first byte data function.
Definition: dspi_peripheral_interface.c:153

Global state for the DSPI slave peripheral interface.