Defines | |
#define | CPHA 0x04 |
#define | CPOL 0x08 |
#define | MHZ4 0x20 |
#define | MHZ2 0x21 |
#define | MHZ1 0x22 |
Typedefs | |
typedef void(* | spi_callback )(u8 data, void *privatedata) |
Functions | |
int | SPI0_setup (int bitrate, int flags) |
int | SPI0_IRQ_Control (spi_callback callback, KFifo *fifo, void *privatedata) |
int | SP0_Tranceive_Blocking (u8 *buffer, int size) |
|
Motorola CPHA clock phase flag |
|
Motorola CPOL clock polarity flag |
|
SPI Init bitrates |
|
Callback used for spi in interrupt mode
|
|
Trancieve of buffer of size size Calling this function will transmit the contents of the buffer out of the SPI in the foreground. Data is received simultanously overwrites the contents of buffer.
|
|
Install a callback and transmit fifo in the interrupt handler Once this function has been called the interrupt hander will call callback with every data byte received. Data will be transmitted through fifo as soon as the SPI becomes ready.
|
|
Configure the SPI This function is called to set the SPI's bitrate and mode
|