move dirs

This commit is contained in:
2022-01-12 16:44:12 +01:00
parent 789d0035b1
commit da7ff3bddb
49 changed files with 0 additions and 0 deletions

20
spi.h Normal file
View File

@@ -0,0 +1,20 @@
#ifndef _SPI_H_
#define _SPI_H_
#include <avr/io.h>
#define SPI_PORT PORTB /* target-specific port containing the SPI lines */
#define SPI_DDR DDRB /* target-specific DDR for the SPI port lines */
#define CS_DDR DDRJ /* target-specific DDR for chip-select */
#define CS_PORT PORTJ /* target-specific port used as chip-select */
#define CS_BIT 3 /* target-specific port line used as chip-select */
uint8_t spi_read();
void spi_write(uint8_t d);
void spi_select(void);
void spi_deselect(void);
unsigned char spi_xchg(unsigned char val);
void spi_init(void);
#endif