diff options
author | Uros Majstorovic <majstor@majstor.org> | 2020-02-19 06:47:43 +0100 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2020-02-19 06:47:43 +0100 |
commit | 6666a131ab36b1d96a854da80524d860f9a3884b (patch) | |
tree | 5039423cb8c5592c20f8dd3aec417158ac058484 /code/fe310/eos/spi.h | |
parent | 15bddabc5cbe0e751fadcaaa7f7c7c36bca61331 (diff) |
eve long press/double tap/inertial scroll
spi flush bugfix
resolved dependecies: spi -> net; event -> net
renamed various handlers
Diffstat (limited to 'code/fe310/eos/spi.h')
-rw-r--r-- | code/fe310/eos/spi.h | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/code/fe310/eos/spi.h b/code/fe310/eos/spi.h index 1619b18..b291ad3 100644 --- a/code/fe310/eos/spi.h +++ b/code/fe310/eos/spi.h @@ -1,25 +1,21 @@ #include <stdint.h> #include "event.h" +#include "spi_dev.h" -#define EOS_SPI_DEV_NET 0 -#define EOS_SPI_DEV_DISP 1 -#define EOS_SPI_DEV_CARD 2 -#define EOS_SPI_DEV_CAM 3 - -#define EOS_SPI_MAX_DEV 3 +#define EOS_SPI_MAX_DEV EOS_DEV_MAX_DEV #define EOS_SPI_FLAG_TX 0x01 #define EOS_SPI_FLAG_MORE 0x02 -#define EOS_SPI_FLAG_AUTOCS 0x04 -#define EOS_SPI_FLAG_BSWAP 0x08 +#define EOS_SPI_FLAG_BSWAP 0x04 void eos_spi_init(void); -void eos_spi_dev_start(unsigned char dev); -void eos_spi_dev_stop(void); -void eos_spi_set_handler(unsigned char dev, eos_evt_fptr_t handler, uint8_t flags); +void eos_spi_start(unsigned char dev, uint32_t div, uint32_t csid, uint8_t pin); +void eos_spi_stop(void); +void eos_spi_set_handler(unsigned char dev, eos_evt_handler_t handler); +void _eos_spi_xchg_init(unsigned char *buffer, uint16_t len, uint8_t flags); void eos_spi_xchg(unsigned char *buffer, uint16_t len, uint8_t flags); -void eos_spi_xchg_handler(void); +void eos_spi_handle_xchg(void); void eos_spi_cs_set(void); void eos_spi_cs_clear(void); @@ -27,3 +23,4 @@ uint8_t eos_spi_xchg8(uint8_t data, uint8_t flags); uint16_t eos_spi_xchg16(uint16_t data, uint8_t flags); uint32_t eos_spi_xchg24(uint32_t data, uint8_t flags); uint32_t eos_spi_xchg32(uint32_t data, uint8_t flags); +void eos_spi_flush(void); |