Functions

spi.h File Reference

#include <avr/io.h>
#include <config.h>

Go to the source code of this file.

Functions

void spi_clock_up_down (void)
uint8_t read_spi_byte (void)
 Read an 8 bit value from the SPI bus.
uint16_t read_spi_2byte (void)
 Read a 16 bit value from the SPI bus.
void write_spi_byte (uint8_t data)
 Transmit an 8 bit value to the SPI bus.
void write_spi_2byte (uint16_t data)
 Transmit a 16 bit value to the SPI bus.

Function Documentation

uint16_t read_spi_2byte ( void   ) 

Read a 16 bit value from the SPI bus.

Returns:
Value from SPI bus.
uint8_t read_spi_byte ( void   ) 

Read an 8 bit value from the SPI bus.

Returns:
Value from SPI bus.
void spi_clock_up_down ( void   )  [inline]
void write_spi_2byte ( uint16_t  data  ) 

Transmit a 16 bit value to the SPI bus.

Parameters:
data Value to send via SPI bus.
void write_spi_byte ( uint8_t  data  ) 

Transmit an 8 bit value to the SPI bus.

Parameters:
data Value to send via SPI bus.