refactor(gpio): make gpio driver as component, and fix astyle

This commit is contained in:
Song Ruo Jing
2023-10-17 12:11:42 +08:00
parent 342535f47c
commit 9461993ec5
104 changed files with 456 additions and 263 deletions

View File

@@ -332,6 +332,7 @@ static inline void gpio_ll_set_level(gpio_dev_t *hw, uint32_t gpio_num, uint32_t
* - 0 the GPIO input level is 0
* - 1 the GPIO input level is 1
*/
__attribute__((always_inline))
static inline int gpio_ll_get_level(gpio_dev_t *hw, uint32_t gpio_num)
{
return (hw->in.in_data_next >> gpio_num) & 0x1;