2022-06-20 15:40:55 +00:00
|
|
|
|
|
|
|
#ifndef __MORSE_H__
|
|
|
|
#define __MORSE_H__
|
|
|
|
|
|
|
|
#include <base.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
typedef struct SPI {
|
2022-06-20 18:52:29 +00:00
|
|
|
gpio_t clock;
|
|
|
|
gpio_t data_out;
|
|
|
|
gpio_t data_in;
|
|
|
|
gpio_t chip_select;
|
2022-06-20 15:40:55 +00:00
|
|
|
} spi_t;
|
|
|
|
|
2022-06-20 18:52:29 +00:00
|
|
|
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);
|
2022-06-20 15:40:55 +00:00
|
|
|
|
|
|
|
#endif
|