WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
GPIO V150 Regs Operation

宏定义

#define hal_gpio_set_bit(x, y, z)   (((uint32_t)(x) & ~bit(y)) | (((uint32_t)(z) & 1U) << (uint32_t)(y)))
 
#define hal_gpio_toggle_bit(x, y)   (((x) & ~bit(y)) | ((~(x)) & bit(y)))
 
#define hal_gpio_read_bit(x, y)   (((uint32_t)(x) >> (uint32_t)(y)) & 1U)
 

函数

void hal_gpio_v150_intr_rebase (uint32_t channel, uint32_t group)
 Init all GPIO interrupt relative regs. Disable, mask and clean all interruption status.
 

变量

uintptr_t g_gpios_regs [GPIO_CHANNEL_MAX_NUM]
 

详细描述

Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2022-2023. All rights reserved.

Description: Provides V150 gpio register operation api
History:
2022-07-27, Create file.

宏定义说明

◆ hal_gpio_read_bit

#define hal_gpio_read_bit (   x,
 
)    (((uint32_t)(x) >> (uint32_t)(y)) & 1U)

Read bit y in x

◆ hal_gpio_set_bit

#define hal_gpio_set_bit (   x,
  y,
 
)    (((uint32_t)(x) & ~bit(y)) | (((uint32_t)(z) & 1U) << (uint32_t)(y)))

sets the bit y in x to the value z

◆ hal_gpio_toggle_bit

#define hal_gpio_toggle_bit (   x,
 
)    (((x) & ~bit(y)) | ((~(x)) & bit(y)))

Toggle the bit y in x

函数说明

◆ hal_gpio_v150_intr_rebase()

void hal_gpio_v150_intr_rebase ( uint32_t  channel,
uint32_t  group 
)

Init all GPIO interrupt relative regs. Disable, mask and clean all interruption status.

参数
[in]channelThe channel id of gpio.
[in]groupThe group id of gpio.

Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2022-2023. All rights reserved.

Description: Provides V150 gpio register operation api
History:
2022-11-27, Create file.

变量说明

◆ g_gpios_regs

uintptr_t g_gpios_regs[GPIO_CHANNEL_MAX_NUM]
extern

Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2022-2022. All rights reserved.

Description: Provides HAL gpio
History:
2022-07-26, Create file.