Herzog Library 00.00.01
rel_libdev.herzog.00.00.01.10606
|
Go to the source code of this file.
Data Structures | |
struct | SPI_SFRS_t |
A structure to represent Special Function Registers for SPI. More... | |
Functions | |
static __INLINE void | f_SPI_ClockDiv (uint8_t div, uint8_t ext_div) |
Set SPI clock divider. More... | |
static __INLINE void | f_SPI_SetPhase (uint8_t phase) |
Set SPI phase. More... | |
static __INLINE void | f_SPI_SetPolarity (uint8_t Polarity) |
Set SPI Polarity. More... | |
static __INLINE void | f_SPI_SetMode (uint8_t mode) |
Set SPI mode. More... | |
static __INLINE void | f_SPI_IRQDelay (uint8_t cnt) |
Set SPI interrupt delay cycles. More... | |
static __INLINE void | f_SPI_Enable (void) |
Enable SPI hardware module. More... | |
static __INLINE void | f_SPI_Disable (void) |
Disable SPI hardware module. More... | |
static __INLINE void | f_SPI_IRQEnable (void) |
Enable SPI interrupt. More... | |
static __INLINE void | f_SPI_IRQDisable (void) |
Disable SPI interrupt. More... | |
static __INLINE uint8_t | f_SPI_ReadData (void) |
Read a byte from SPI data register. More... | |
static __INLINE void | f_SPI_WriteData (uint8_t data) |
Write a byte to SPI data register. More... | |
static __INLINE uint8_t | f_SPI_GetStatus (void) |
Get SPI status. More... | |
static __INLINE void | f_SPI_ClearIRQ (void) |
Clear SPI interrupt flag. More... | |
static __INLINE uint8_t | f_SPI_TxFIFOFull (void) |
Check if transnmitter FIFO buffer full. More... | |
static __INLINE uint8_t | f_SPI_TxFIFOEmpty (void) |
Check if transnmitter FIFO buffer empty. More... | |
static __INLINE uint8_t | f_SPI_RxFIFOFull (void) |
Check if receiver FIFO buffer full. More... | |
static __INLINE uint8_t | f_SPI_RxFIFOEmpty (void) |
Check if receiver FIFO buffer empty. More... | |
This file is proprietary to Indie Semiconductor. All rights reserved. Reproduction or distribution, in whole or in part, is forbidden except by express written permission of Indie Semiconductor.
#define E_SPI_CLOCK_DIV1024 1 |
#define E_SPI_CLOCK_DIV128 2 |
#define E_SPI_CLOCK_DIV16 2 |
#define E_SPI_CLOCK_DIV2 0 |
#define E_SPI_CLOCK_DIV2048 2 |
#define E_SPI_CLOCK_DIV256 3 |
#define E_SPI_CLOCK_DIV32 3 |
#define E_SPI_CLOCK_DIV4 1 |
#define E_SPI_CLOCK_DIV4096 3 |
#define E_SPI_CLOCK_DIV512 0 |
#define E_SPI_CLOCK_DIV64 1 |
#define E_SPI_CLOCK_DIV8 0 |
#define E_SPI_CLOCK_EXT_DIV1024 2 |
#define E_SPI_CLOCK_EXT_DIV128 1 |
#define E_SPI_CLOCK_EXT_DIV16 0 |
#define E_SPI_CLOCK_EXT_DIV2 0 |
#define E_SPI_CLOCK_EXT_DIV2048 2 |
#define E_SPI_CLOCK_EXT_DIV256 1 |
#define E_SPI_CLOCK_EXT_DIV32 0 |
#define E_SPI_CLOCK_EXT_DIV4 0 |
#define E_SPI_CLOCK_EXT_DIV4096 2 |
#define E_SPI_CLOCK_EXT_DIV512 2 |
#define E_SPI_CLOCK_EXT_DIV64 1 |
#define E_SPI_CLOCK_EXT_DIV8 1 |
#define E_SPI_CLOCK_PHASE0 0 |
#define E_SPI_CLOCK_PHASE1 1 |
#define E_SPI_CLOCK_POLARITY0 0 |
#define E_SPI_CLOCK_POLARITY1 1 |
#define E_SPI_INT_DELAY_COUNT0 0 |
#define E_SPI_INT_DELAY_COUNT1 1 |
#define E_SPI_INT_DELAY_COUNT2 2 |
#define E_SPI_INT_DELAY_COUNT3 3 |
#define E_SPI_STATUS_INTERRUPT ()uint8_t) (1<<7)) |
#define E_SPI_STATUS_RX_FIFO_EMPTY ((uint8_t) (1<<0)) |
#define E_SPI_STATUS_RX_FIFO_FULL ((uint8_t) (1<<1)) |
#define E_SPI_STATUS_TX_FIFO_EMPTY ((uint8_t) (1<<2)) |
#define E_SPI_STATUS_TX_FIFO_FULL ((uint8_t) (1<<3)) |
#define E_SPI_STATUS_WRITE_COLLISIION ((uint8_t) (1<<6)) |
#define SPI_SFRS ((__IO SPI_SFRS_t *) (0x5000001C)) |
The starting address of SPI SFRS.
|
static |
Clear SPI interrupt flag.
|
static |
Set SPI clock divider.
div | The setting for standard divider bits |
ext_div | The setting for extended divider bits |
|
static |
Disable SPI hardware module.
|
static |
Enable SPI hardware module.
|
static |
Get SPI status.
|
static |
Set SPI interrupt delay cycles.
|
static |
Disable SPI interrupt.
|
static |
Enable SPI interrupt.
|
static |
Read a byte from SPI data register.
|
static |
Check if receiver FIFO buffer empty.
|
static |
Check if receiver FIFO buffer full.
|
static |
Set SPI mode.
|
static |
Set SPI phase.
|
static |
Set SPI Polarity.
|
static |
Check if transnmitter FIFO buffer empty.
|
static |
Check if transnmitter FIFO buffer full.
|
static |
Write a byte to SPI data register.