36#ifndef ATMEGA_SPI_DOT_H
37#define ATMEGA_SPI_DOT_H
spi_dbl_clk_mode_t
Enumerated constants for selecting whether the SPI clock speed is doubled.
spi_transfer_mode_t
Enumerated constants for selecting the transfer mode, most significant bit first of least significant...
spi_phase_mode_t
Enumerated constants for selecting the SPI phase mode, on leading clock edge.
void init_spi(spi_transfer_mode_t transfer_mode, spi_control_mode_t control_mode, spi_polarity_mode_t polarity_mode, spi_phase_mode_t phase_mode, spi_clk_rate_t clk_rate, spi_dbl_clk_mode_t dbl_clock)
Initialisation routine to set up SPI comms.
spi_polarity_mode_t
Enumerated constants for selecting the SPI polarity mode, rising or falling on leading clock edge.
spi_clk_rate_t
Enumerated constants for selecting the SPI clock rate.
spi_control_mode_t
Enumerated constants for selecting whether the host MCU is the controller or peripheral (formerly kno...
uint8_t spi_trade_byte(uint8_t data)
Sends out a byte of data over SPI and returns the byte it receives.
uint16_t spi_trade_word(uint16_t data)
Sends out a 16bit word of data over spi (in two bytes) and returns the byte it receives.