NinjaFlight
|
#include <stdbool.h>
#include <stdint.h>
#include <platform.h>
#include "build_config.h"
#include "gpio.h"
#include "bus_spi.h"
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) |
#define BR_CLEAR_MASK 0xFFC7 |
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 | ||
) |