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

@@ -492,6 +492,18 @@ static inline __attribute__((always_inline)) void gpio_ll_iomux_func_sel(uint32_
PIN_FUNC_SELECT(pin_name, 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 peripheral output to an GPIO pad through the IOMUX.
*