#include <spi.h>
Public Member Functions | |
void | disable (GPIO &cs) |
void | enable (GPIO &cs) |
void | init (const spi_hardware_struct_t *conf) |
bool | is_busy () |
void | set_divisor (uint16_t new_divisor) |
bool | transfer (uint8_t *out_data, uint32_t num_bytes, uint8_t *in_data, GPIO *cs=NULL, void(*cb)(void)=NULL) |
uint8_t | transfer_byte (uint8_t data, GPIO *cs=NULL) |
void | transfer_complete_cb () |
bool | write (const uint8_t *out_data, uint32_t num_bytes, GPIO *cs=NULL) |
Private Member Functions | |
void | perform_transfer () |
Private Attributes | |
volatile bool | busy_ = false |
const spi_hardware_struct_t * | c_ |
GPIO * | cs_ |
DMA_InitTypeDef | DMA_InitStructure_ |
uint32_t | errors_ = 0 |
uint8_t * | in_buffer_ptr_ |
GPIO | miso_ |
GPIO | mosi_ |
uint32_t | num_bytes_ |
const uint8_t * | out_buffer_ptr_ |
GPIO | sck_ |
void(* | transfer_cb_ )(void) = NULL |
void SPI::init | ( | const spi_hardware_struct_t * | conf | ) |
|
private |
|
private |