diff options
| author | Physick <96335032+DegustatorPonos@users.noreply.github.com> | 2026-01-02 22:41:25 +0500 |
|---|---|---|
| committer | Physick <96335032+DegustatorPonos@users.noreply.github.com> | 2026-01-02 22:41:25 +0500 |
| commit | 9477bf2b6cce08f648b1d9b3c37a2bf697854e70 (patch) | |
| tree | 7c94f575961e41e50d65052d473735b6daa11f0e /lib/spi_sw.h | |
Not working version
Diffstat (limited to 'lib/spi_sw.h')
| -rw-r--r-- | lib/spi_sw.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/spi_sw.h b/lib/spi_sw.h new file mode 100644 index 0000000..26af12d --- /dev/null +++ b/lib/spi_sw.h @@ -0,0 +1,22 @@ +#define STM32F1 +#include <stdint.h> +#include <stdbool.h> +#include <sys/types.h> +#include <libopencm3/stm32/gpio.h> +#include "ili9341.h" + +#ifndef SPI_SW +#define SPI_SW + +#define TRAILING_EDGE false + +typedef struct { + uint16_t MOSI_pin; + uint16_t CLK_pin; + uint16_t delay; +} SPI_IMPL; + +SPI_IMPL SpiInit(uint16_t MOSI_pin, uint16_t CLK_pin); +void SpiSend(SPI_IMPL *spi, uint8_t playload); + +#endif //SPI_SW |
