PHiLIP
|
Controls the spi peripheral. More...
#include <string.h>
#include <errno.h>
#include "stm32f1xx_hal.h"
#include "PHiLIP_typedef.h"
#include "port.h"
#include "app_access.h"
#include "app_common.h"
#include "app_reg.h"
#include "gpio.h"
#include "spi.h"
Data Structures | |
struct | spi_dev |
The parameters for spi control. More... | |
Macros | |
#define | SPI_ADDR_MASK (0x80) |
Checks the write direction. | |
Enumerations | |
enum | SPI_STATE { SPI_INITIALIZED, SPI_FRAME_STARTED, SPI_WRITING, SPI_READING, SPI_TRANSFERING, SPI_FRAME_FINISHED } |
The state settings of the SPI. More... | |
enum | SPI_IF_TYPE { SPI_IF_TYPE_REG, SPI_IF_TYPE_HS, SPI_IF_TYPE_ECHO, SPI_IF_TYPE_CONST } |
Interface type for the spi. More... | |
Functions | |
void | init_dut_spi (map_t *reg) |
Initializes spi registers. More... | |
void | init_dut_spi_msp () |
Only for use with the STM32xxxx_HAL_Driver. | |
void | deinit_dut_spi_msp () |
Only for use with the STM32xxxx_HAL_Driver. | |
error_t | commit_dut_spi () |
Commits the spi registers and executes operations. More... | |
void | update_dut_spi_inputs () |
Updates the spi input levels. | |
void | DUT_SPI_INT (void) |
This function handles DUT_SPI global interrupt. | |
void | GPIO_NSS_INT () |
Interrupt for the spi line raise or lower. More... | |
Controls the spi peripheral.