spi.h
Go to the documentation of this file.
/*
* spi.h
*
* Created on: Nov 16, 2015
* Author: Philipp Hinz
*/
#ifndef SPI_H_
#define SPI_H_
#include <inttypes.h>
uint8_t spi_readwrite(uint8_t data);
void spi_init(void);
void shift_init(void);
void shift_data(uint8_t data);
#define SHIFT_SCLR 21 // ~Master Reset
#define SHIFT_RCK 22 // storage register clock input
#define SHIFT_G 26 // ~Output Enable
#endif /* SPI_H_ */
shift_init
void shift_init(void)
Initializes the shift register.
Definition: spi.cpp:51
shift_data
void shift_data(uint8_t data)
Sends a byte to the shift register.
Definition: spi.cpp:69
spi_readwrite
uint8_t spi_readwrite(uint8_t data)
Writes the data on the SPI bus and returns the reply.
Definition: spi.cpp:26
spi_init
void spi_init(void)
Initializes the SPI bus.
Definition: spi.cpp:39