![]() |
snickerdoodle Platform Controller
firmware for STM32F0 platform controller
|
Bridging from SPI to other peripherals. More...
Data Structures | |
struct | sd_spbr_cmd |
SPI bridge device operation structure. More... | |
struct | sd_spbr_dev |
SPI bridge device structure. More... | |
struct | sd_spbr |
SPI bridge structure. More... | |
Enumerations | |
enum | sd_spbr_state { SD_SPBR_READ_DEVICE, SD_SPBR_READ_CMD, SD_SPBR_IN_PROCESS } |
Functions | |
static void | sd_spbr_rx_isr (struct sd_spbr *spbr) |
SPI Bridge Receive Interrupt Routine. More... | |
static struct sd_spbr_dev * | sd_spbr_find_device (struct sd_spbr_dev *head, uint8_t id) |
SPI Bridge Find Device Searches a sentinel terminated table pointed to by head for a matching ID and returns a pointer to the device or NULL. More... | |
static struct sd_spbr_cmd * | sd_spbr_find_cmd (struct sd_spbr_cmd *head, uint8_t opcode) |
SPI Bridge Find Command Searches a sentinel terminated table pointed to by head for a matching ID and returns a pointer to the device or NULL. More... | |
void | sd_spbr_init (struct sd_spbr *spbr, SPI_HandleTypeDef *spi) |
SPI Bridge Initialize. More... | |
void | sd_spbr_irqhandler (struct sd_spbr *spbr) |
SPI Bridge Interrupt Handler Handle interrupt events on the SPI peripheral. More... | |
Variables | |
struct sd_spbr | spi2_spbr |
static struct sd_spbr_dev | spbr_dev_tab [] |
Bridging from SPI to other peripherals.
|
static |
#include <Src/sd_spi_bridge.c>
SPI Bridge Find Command Searches a sentinel terminated table pointed to by head for a matching ID and returns a pointer to the device or NULL.
head | Pointer to head of table for searching |
id | ID value to search for |
Pointer | to matching device or NULL if not found |
|
static |
#include <Src/sd_spi_bridge.c>
SPI Bridge Find Device Searches a sentinel terminated table pointed to by head for a matching ID and returns a pointer to the device or NULL.
head | Pointer to head of table for searching |
id | ID value to search for |
Pointer | to matching device or NULL if not found |
void sd_spbr_init | ( | struct sd_spbr * | spbr, |
SPI_HandleTypeDef * | spi | ||
) |
#include <Src/sd_spi_bridge.c>
SPI Bridge Initialize.
spbr | Pointer to SPI bridge structure to initialize |
spi | SPI handle to use for bridge |
None |
void sd_spbr_irqhandler | ( | struct sd_spbr * | spbr | ) |
#include <Src/sd_spi_bridge.c>
SPI Bridge Interrupt Handler Handle interrupt events on the SPI peripheral.
spbr | Pointer to SPI bridge structure |
None |
|
static |
#include <Src/sd_spi_bridge.c>
SPI Bridge Receive Interrupt Routine.
spbr | Pointer to SPI bridge structure |
None |
|
static |
#include <Src/sd_spi_bridge.c>