mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-07 20:00:53 +00:00
feat(spi_master): add transaction config for dynamic clock speed update
Closes https://github.com/espressif/esp-idf/issues/13753
This commit is contained in:
@@ -735,6 +735,7 @@ static inline void spi_ll_master_set_clock_by_reg(spi_dev_t *hw, const spi_ll_cl
|
||||
*
|
||||
* @return Frequency of given dividers.
|
||||
*/
|
||||
__attribute__((always_inline))
|
||||
static inline int spi_ll_freq_for_pre_n(int fapb, int pre, int n)
|
||||
{
|
||||
return (fapb / (pre * n));
|
||||
@@ -750,6 +751,7 @@ static inline int spi_ll_freq_for_pre_n(int fapb, int pre, int n)
|
||||
*
|
||||
* @return Actual (nearest) frequency.
|
||||
*/
|
||||
__attribute__((always_inline))
|
||||
static inline int spi_ll_master_cal_clock(int fapb, int hz, int duty_cycle, spi_ll_clock_val_t *out_reg)
|
||||
{
|
||||
typeof(GPSPI2.clock) reg = {.val = 0};
|
||||
|
Reference in New Issue
Block a user