mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 04:02:27 +00:00
spi_master: add feature spi periph clk source selectable
This commit is contained in:
@@ -36,8 +36,6 @@ extern "C" {
|
||||
#define SPI_LL_ONE_LINE_USER_MASK (SPI_FWRITE_QUAD | SPI_FWRITE_DUAL)
|
||||
/// Swap the bit order to its correct place to send
|
||||
#define HAL_SPI_SWAP_DATA_TX(data, len) HAL_SWAP32((uint32_t)(data) << (32 - len))
|
||||
/// This is the expected clock frequency
|
||||
#define SPI_LL_PERIPH_CLK_FREQ (80 * 1000000)
|
||||
#define SPI_LL_GET_HW(ID) ((ID)==0? ({abort();NULL;}):&GPSPI2)
|
||||
|
||||
#define SPI_LL_DATA_MAX_BIT_LEN (1 << 18)
|
||||
@@ -92,6 +90,18 @@ typedef enum {
|
||||
/*------------------------------------------------------------------------------
|
||||
* Control
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Select SPI peripheral clock source (master).
|
||||
*
|
||||
* @param hw Beginning address of the peripheral registers.
|
||||
* @param clk_source clock source to select, see valid sources in type `spi_clock_source_t`
|
||||
*/
|
||||
static inline void spi_ll_set_clk_source(spi_dev_t *hw, spi_clock_source_t clk_source)
|
||||
{
|
||||
//empty, keep this for compatibility
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize SPI peripheral (master).
|
||||
*
|
||||
|
Reference in New Issue
Block a user