LPSPI Peripheral
Bootloader » Peripheral Definitions

LPSPI peripheral interface. More...

Collaboration diagram for LPSPI Peripheral:

## Data Structures

struct | lpspi_transfer_info_t
| Synchronization state between LPSPI ISR and read/write functions. More...

## Functions

static bool | lpspi_poll_for_activity (const peripheral_descriptor_t *self)
static status_t | lpspi_full_init (const peripheral_descriptor_t *self, serial_byte_receive_func_t function)
static void | lpspi_full_shutdown (const peripheral_descriptor_t *self)
static void | lpspi_data_source (uint8_t *source_byte)
static void | lpspi_initial_data_sink (uint8_t sink_byte, uint16_t instance)
static void | lpspi_data_sink (uint8_t sink_byte, uint16_t instance)
static status_t | lpspi_write (const peripheral_descriptor_t *self, const uint8_t *buffer, uint32_t byteCount)
static void | lpspi_slave_irq_handler (uint32_t instance)
| LPSPI Slave Generic IRQ handler. More...
void | LPSPI_SetSystemIRQ (uint32_t instance, PeripheralSystemIRQSetting set)
void | LPSPI0_IRQHandler ()
| Implementation of LPSPI0 handler named in startup code. More...
void | LPSPI1_IRQHandler ()
| Implementation of LPSPI1 handler named in startup code. More...
void | LPSPI2_IRQHandler ()
| Implementation of LPSPI2 handler named in startup code. More...

## Variables

const peripheral_control_interface_t | g_lpspiControlInterface
| Control interface for the LPSPI peripheral driver. More...
const peripheral_byte_inteface_t | g_lpspiByteInterface = {.init = NULL, .write = lpspi_write }
| Byte I/O interface for the LPSPI peripheral driver.
static lpspi_transfer_info_t | s_lpspiInfo = {.writeData = 0, .bytesToTransfer = 0, .data_source = lpspi_data_source }
static bool | s_lpspiActivity [FSL_FEATURE_SOC_LPSPI_COUNT] = { false }
| Flag for detecting device activity.
static bool | s_lpspiIntialized [FSL_FEATURE_SOC_LPSPI_COUNT] = { false }
static const uint32_t | g_lpspiBaseAddr [] = LPSPI_BASE_ADDRS
static serial_byte_receive_func_t | s_lpspi_app_data_sink_callback

## Usage Information

LPSPI peripheral interface.

## Data Structure Documentation

struct lpspi_transfer_info_t

Synchronization state between LPSPI 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, uint16_t instance)

## Function Documentation

void LPSPI0_IRQHandler | ( |  | ) |

Implementation of LPSPI0 handler named in startup code.

Passes instance to generic LPSPI IRQ handler.

void LPSPI1_IRQHandler | ( |  | ) |

Implementation of LPSPI1 handler named in startup code.

Passes instance to generic LPSPI IRQ handler.

void LPSPI2_IRQHandler | ( |  | ) |

Implementation of LPSPI2 handler named in startup code.

Passes instance to generic LPSPI IRQ handler.

static void lpspi_slave_irq_handler | ( | uint32_t | instance | ) |

static

LPSPI Slave Generic IRQ handler.

Parameters

  instance | Instance number of the LPSPI module.

## Variable Documentation

const peripheral_control_interface_t g_lpspiControlInterface

Initial value:
= {
.pollForActivity = lpspi_poll_for_activity, .init = lpspi_full_init, .shutdown = lpspi_full_shutdown, .pump = 0
}

Control interface for the LPSPI peripheral driver.