CoffeePi Coffee machine control for Raspberry Pi

- Main Page
- Data Structures
- Files

- File List
- Globals

spi.h
Go to the documentation of this file.
1 /*
2 * spi.h
3 *
4 * Created on: Nov 16, 2015
5 * Author: Philipp Hinz
6 */
7
8 #ifndef SPI_H_
9 #define SPI_H_
10 #include <inttypes.h>
11
12 uint8_t spi_readwrite(uint8_t data);
13 void spi_init(void);
14 void shift_init(void);
15 void shift_data(uint8_t data);
16
17 #define SHIFT_SCLR 21 // ~Master Reset
18 #define SHIFT_RCK 22 // storage register clock input
19 #define SHIFT_G 26 // ~Output Enable
20
21
22 #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