NinjaFlight
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
bus_spi.c File Reference
#include <stdbool.h>
#include <stdint.h>
#include <platform.h>
#include "build_config.h"
#include "gpio.h"
#include "bus_spi.h"
Include dependency graph for bus_spi.c:

Macros

#define BR_CLEAR_MASK   0xFFC7
 

Functions

bool spiInit (SPI_TypeDef *instance)
 
uint8_t spiTransferByte (SPI_TypeDef *instance, uint8_t data)
 
bool spiIsBusBusy (SPI_TypeDef *instance)
 
void spiTransfer (SPI_TypeDef *instance, uint8_t *out, const uint8_t *in, int len)
 
void spiSetDivisor (SPI_TypeDef *instance, uint16_t divisor)
 

Macro Definition Documentation

#define BR_CLEAR_MASK   0xFFC7

Function Documentation

bool spiInit ( SPI_TypeDef *  instance)
bool spiIsBusBusy ( SPI_TypeDef *  instance)

Return true if the bus is currently in the middle of a transmission.

void spiSetDivisor ( SPI_TypeDef *  instance,
uint16_t  divisor 
)
void spiTransfer ( SPI_TypeDef *  instance,
uint8_t *  out,
const uint8_t *  in,
int  len 
)
uint8_t spiTransferByte ( SPI_TypeDef *  instance,
uint8_t  data 
)