#include "bf52x_spi.h"
#include "bf52x_uart.h"
Include dependency graph for bf52x_spi.c:
Defines | |
#define | IS_TDBR_FULL (*pSPI_STAT & TXS) |
.c Contains implementation for BF52x SPI master. | |
#define | IS_RDBR_EMPTY !(*pSPI_STAT & RXS) |
#define | DELAY 0 |
#define | DELAY_TIME 0x200000 |
Functions | |
void | delay (unsigned long value) |
int | bf52x_spi_csHigh (enum chipselect cs) |
int | bf52x_spi_csLow (enum chipselect cs) |
int | bf52x_spi_master_init (bf52x_spi_settings_st *spi_settings) |
Initializes the SPI interface as master. | |
int | bf52x_spi_master_send16 (unsigned short *data, unsigned short len) |
int | bf52x_spi_master_send8 (unsigned char *data, unsigned short len, unsigned char usedelay) |
int | bf52x_spi_master_release () |
#define DELAY 0 |
#define DELAY_TIME 0x200000 |
#define IS_RDBR_EMPTY !(*pSPI_STAT & RXS) |
#define IS_TDBR_FULL (*pSPI_STAT & TXS) |
.c Contains implementation for BF52x SPI master.
int bf52x_spi_csHigh | ( | enum chipselect | cs | ) |
int bf52x_spi_csLow | ( | enum chipselect | cs | ) |
int bf52x_spi_master_init | ( | bf52x_spi_settings_st * | spi_settings | ) |
Initializes the SPI interface as master.
This function initializes the SPI interface as master and configures the clock based on user input.
Pre-conditions:
Post condtions:
Parameters:
spi_settings | - see the above bf52x_spi_settings_st structure declaration for. |
int bf52x_spi_master_release | ( | ) |
int bf52x_spi_master_send16 | ( | unsigned short * | data, | |
unsigned short | len | |||
) |
int bf52x_spi_master_send8 | ( | unsigned char * | data, | |
unsigned short | len, | |||
unsigned char | usedelay | |||
) |
void delay | ( | unsigned long | value | ) |