change(hal): rewrite gpio_ll_set_iomux_pin_ctrl api

This commit is contained in:
wuzhenghui
2023-09-01 10:44:24 +08:00
parent 471f1f61ae
commit 1f10c84a4f
9 changed files with 90 additions and 6 deletions

View File

@@ -534,6 +534,18 @@ static inline void gpio_ll_iomux_out(gpio_dev_t *hw, uint8_t gpio_num, int func,
gpio_ll_func_sel(hw, gpio_num, func);
}
/**
* @brief Control the pin in the IOMUX
*
* @param bmap write mask of control value
* @param val Control value
* @param shift write mask shift of control value
*/
static inline __attribute__((always_inline)) void gpio_ll_set_pin_ctrl(uint32_t val, uint32_t bmap, uint32_t shift)
{
SET_PERI_REG_BITS(PIN_CTRL, bmap, val, shift);
}
/**
* @brief Set clock source of IO MUX module
*