aboutsummaryrefslogtreecommitdiff
path: root/spi_usi.h
blob: 2e603acd2020e1302c4fd9310a61731ce435b73f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <stdio.h>
#include <avr/io.h>
#include <avr/interrupt.h>
#include <inttypes.h>

#include "mcu/mcu.h"

#ifndef _IOE_SPI_USI_H_
#define _IOE_SPI_USI_H_

inline void ioe_spi_usi_init(void);
#ifdef IOE_SPI_USI_MASTER
inline int8_t ioe_spi_usi_transfer(int8_t data);
#else
inline void ioe_spi_usi_expose(int8_t data);
inline void ioe_spi_usi_expect(void);
inline int ioe_spi_usi_ready(void);
inline void ioe_spi_usi_join(void);

// Following function must be user defined
inline void ioe_spi_usi_retrieve(int8_t data);
#endif /* IOE_SPI_USI_MASTER */


#endif /* _IOE_SPI_USI_H_ */