|
|
|
@ -39,6 +39,12 @@ typedef enum{
|
|
|
|
|
*/
|
|
|
|
|
void spi_init(spiCH_t spi_hw_ch);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief SPI hardware peripheral reset
|
|
|
|
|
* @param spi_hw_ch SPI hardware channel
|
|
|
|
|
*/
|
|
|
|
|
void spi_reset(spiCH_t spi_hw_ch);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Enable spi hardware channel
|
|
|
|
|
* @param spi_hw_ch SPI hardware channel
|
|
|
|
@ -47,23 +53,26 @@ void spi_enable(spiCH_t spi_hw_ch);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief set SPI clock polarity
|
|
|
|
|
* @param spi_hw_ch SPI hardware channel
|
|
|
|
|
* @param clkPol Clock polarity
|
|
|
|
|
*/
|
|
|
|
|
void spi_setPolarity(spi_clkPol_t clkPol);
|
|
|
|
|
void spi_setPolarity(spiCH_t spi_hw_ch, spi_clkPol_t clkPol);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Set SPI frame format
|
|
|
|
|
* @param spi_hw_ch SPI hardware cannel
|
|
|
|
|
* @param framef Frame format
|
|
|
|
|
*/
|
|
|
|
|
void spi_set_setFrameFormat(spi_framef_t framef);
|
|
|
|
|
void spi_set_setFrameFormat(spiCH_t spi_hw_ch, spi_framef_t framef);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Set Clock Prescaler
|
|
|
|
|
* This is dependent on your target device. Please enter in the correct value.
|
|
|
|
|
* The entered Value will be masked with the maximal number of bits (truncated)
|
|
|
|
|
* @param spi_hw_ch SPI hardware channel
|
|
|
|
|
* @param clkDiv
|
|
|
|
|
*/
|
|
|
|
|
void spi_setClockPrescaler(uint32_t clkDiv);
|
|
|
|
|
void spi_setClockPrescaler(spiCH_t spi_hw_ch,uint32_t clkDiv);
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* @brief Transmits and receives on byte of data
|
|
|
|
|