#include "tll_config.h"
Include dependency graph for bf52x_spi.h:
This graph shows which files directly or indirectly include this file:
Data Structures | |
struct | _bf52x_spi_settings_st |
.h Contains declarations for BF52X SPI driver. More... | |
Typedefs | |
typedef _bf52x_spi_settings_st | bf52x_spi_settings_st |
.h Contains declarations for BF52X SPI driver. | |
Enumerations | |
enum | chipselect { PH9_J13_CS = 0, PH10_J10_CS = 1, PH12_SDCARD_CS = 2, PG1_FLASH_CS = 3 } |
Functions | |
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_send (void *data, unsigned short len, unsigned char datatype) |
Send data. | |
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_get (void *data, unsigned short len, unsigned char datatype) |
Receive data. | |
int | bf52x_spi_master_get16 (unsigned short *data, unsigned short len) |
int | bf52x_spi_master_get8 (unsigned char *data, unsigned short len) |
int | bf52x_spi_master_release () |
typedef struct _bf52x_spi_settings_st bf52x_spi_settings_st |
.h Contains declarations for BF52X SPI driver.
enum chipselect |
int bf52x_spi_csHigh | ( | enum chipselect | cs | ) |
int bf52x_spi_csLow | ( | enum chipselect | cs | ) |
int bf52x_spi_master_get | ( | void * | data, | |
unsigned short | len, | |||
unsigned char | datatype | |||
) |
Receive data.
This function sends the command initially stored in data buffer and starts receiving the data.
Pre-conditions:
Post condtions:
Parameters:
data | - Initialy holds the command to be transmitted and space (of length bytes) for holding received data. len - length of data to be received. datatype - Indicates 1 byte or 2 byte data buffer. |
int bf52x_spi_master_get16 | ( | unsigned short * | data, | |
unsigned short | len | |||
) |
int bf52x_spi_master_get8 | ( | unsigned char * | data, | |
unsigned short | len | |||
) |
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_send | ( | void * | data, | |
unsigned short | len, | |||
unsigned char | datatype | |||
) |
Send data.
This function sends the data.
Pre-conditions:
Post condtions:
Parameters:
data | - Holds the data to be transmitted. len - length of data to be transmitted. datatype - Indicates 1 byte or 2 byte data buffer. |
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 | |||
) |