void spi_write(unsigned char *Cmd, int CmdLen, unsigned char *Data, int DataLen, GPIO_PinTypeDef CSPin)
This function serves to write a bulk of data to the SPI slave device specified by the CS pin...
void spi_master_init(unsigned char DivClock, SPI_ModeTypeDef Mode)
This function configures the clock and working mode for SPI interface.
void spi_slave_gpio_set(SPI_GPIO_GroupTypeDef PinGrp)
This function selects a pin port for the SPI interface (slave mode)
SPI_ModeTypeDef
Define the mode for SPI interface.
Definition: spi.h:50
void spi_read(unsigned char *Cmd, int CmdLen, unsigned char *Data, int DataLen, GPIO_PinTypeDef CSPin)
This function serves to read a bulk of data from the SPI slave device specified by the CS pin...
void spi_master_gpio_set(SPI_GPIO_GroupTypeDef PinGrp)
This function selects a pin port for the SPI interface (master mode)
SPI_GPIO_GroupTypeDef
Define pin for SPI interface SDO SDI SCK CN A2 A3 A4 D6 B7 B6 D7 D2.
Definition: spi.h:41
GPIO_PinTypeDef
Define GPIO types.
Definition: gpio_8258.h:38
#define reg_rst0
Definition: register_8258.h:143
void spi_slave_init(unsigned char DivClock, SPI_ModeTypeDef Mode)
This function configures the clock and working mode for SPI interface.
static void reset_spi_moudle(void)
This function reset SPI module.
Definition: spi.h:77
SPI_24M_ClkTypeDef
Define the clk for SPI interface(system clock = 24M)
Definition: spi.h:60
Definition: register_8258.h:145
void spi_masterCSpin_select(GPIO_PinTypeDef CSPin)
This function selects a GPIO pin as CS of SPI function.
void spi_set_share_mode_en(void)
This function use to set the share mode of SPI.