36 #ifndef HSPI_PRESCALER 37 #define HSPI_PRESCALER 16 72 PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTDI_U, 2);
73 PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTCK_U, 2);
74 PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTMS_U, 2);
78 PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTDO_U, 2);
82 WRITE_PERI_REG(PERIPHS_IO_MUX, 0x305);
88 WRITE_PERI_REG(PERIPHS_IO_MUX, 0x105);
114 valueOfRegisters &= \
122 valueOfRegisters &= \
183 ((
uint32_t *)write_data) [word_ind];
203 last_word |= ((
uint32_t) 0xffU & write_data[byte_ind + bytes ]);
230 ((
uint32_t *)read_data) [word_ind] = \
247 read_data[byte_ind++] = (
uint8_t) 0xff & last_word;
332 memset(data, 0xff, bytes);
void hspi_RX(uint8_t *data, int count)
HSPI read using FIFO.
Master include file for project Includes all project includes and defines here.
#define SPI_USR_DIN_BITLEN_S
void hspi_init(uint32_t prescale, int hwcs)
HSPI Initiaization - with automatic chip select Pins: MISO GPIO12 MOSI GPIO13 CLK GPIO14 CS GPIO15 - ...
#define SPI_FLASH_CTRL1(i)
static void hspi_startSend(void)
HSPI Start Send.
#define SPI_USR_DIN_BITLEN
#define SPI_CLK_EQU_SYSCLK
#define SPI_FLASH_USR_ADDR
#define SPI_FLASH_CLOCK(i)
void hspi_waitReady(void)
HSPI Ready wait.
#define SPI_FLASH_USR_DUMMY
void hspi_TX(uint8_t *data, int count)
SPI buffered write functions.
#define SPI_FLASH_USER1(i)
static void hspi_readFIFO(uint8_t *read_data, int bytes)
HSPI FIFO Read in units of 32 bits (4 byte words)
#define SPI_FLASH_USER(i)
static void hspi_writeFIFO(uint8_t *write_data, int bytes)
HSPI FIFO write in units of 32 bits (4 byte words)
#define SPI_FLASH_USR_DIN
#define SPI_USR_OUT_BITLEN_S
#define SPI_USR_OUT_BITLEN
static void hspi_setBits(uint16_t bytes)
HSPI FIFO send or receive byte count.
static void hspi_config(int configState)
HSPI Configuration for tranasmit and receive.
void hspi_TXRX(uint8_t *data, int count)
HSPI write and read using FIFO.
uint32_t hspi_clock
hspi clock cached value