From 412a8f99928beff605805807b0f07f6bf8d0a965 Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Fri, 13 May 2022 12:45:53 +0200 Subject: code rename --- fw/fe310/eos/soc/spi_dev.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 fw/fe310/eos/soc/spi_dev.h (limited to 'fw/fe310/eos/soc/spi_dev.h') diff --git a/fw/fe310/eos/soc/spi_dev.h b/fw/fe310/eos/soc/spi_dev.h new file mode 100644 index 0000000..e801f7e --- /dev/null +++ b/fw/fe310/eos/soc/spi_dev.h @@ -0,0 +1,19 @@ +#include + +#define EOS_SPI_DEV_NET 0 +#define EOS_SPI_DEV_EVE 1 +#define EOS_SPI_DEV_SDC 2 +#define EOS_SPI_DEV_CAM 3 + +int eos_spi_dev_init(uint8_t wakeup_cause); +int eos_spi_select(unsigned char dev); +int eos_spi_deselect(void); + +uint8_t eos_spi_dev(void); +uint16_t eos_spi_div(unsigned char dev); +uint8_t eos_spi_csid(unsigned char dev); +uint8_t eos_spi_cspin(unsigned char dev); + +void eos_spi_lock(void); +void eos_spi_unlock(void); +void eos_spi_set_div(unsigned char dev, uint16_t div); -- cgit v1.2.3