avr/spi/spi.h

21 lines
351 B
C
Raw Normal View History

#ifndef __MORSE_H__
#define __MORSE_H__
#include <base.h>
#include <stdlib.h>
typedef struct SPI {
gpio_t clock;
gpio_t data_out;
gpio_t data_in;
gpio_t chip_select;
} spi_t;
void spi_initialize(spi_t *spi);
void spi_acquire(spi_t *spi);
void spi_release(spi_t *spi);
uint8_t spi_transfer_byte(spi_t *spi, uint8_t output);
#endif