int bl_gpio_output_set(uint8_t pin, uint8_t value); // 设置GPIO电平值,0表示低电平;1表示...
gpio :参考宏IO_PORTx_xx,如:IO_PORTA_00; signal:参考gpio.h文件中INPUT_CH_SIGNAL的枚举,如:INPUT_CH_SIGNAL_TIMER1_CIN; type :参考gpio.h文件中的INPUT_CH_TYPE枚举,如:INPUT_CH_TYPE_GP_ICH;返回值 :通道号; 4.3.3. AD18 (1)u32 gpio_mux_out(u32 gpio, enum GPIO_OUTPUT_FUN fun...
Port B(GPB) : 9-input/output portPort C(GPC) : 16-input/output portPort D(GPD) : 16-input/output portPort E(GPE) : 16-input/output portPort F(GPF) : 8-input/output portPort G(GPG) : 8-input/output portPort H(GPH) : 15-input/output portPort K(GPK) : 16-input/output por...
voidgpio_rutine(void){staticinti =0;if(short_press_flag) {if(i++ ==0) {GPIO_OUTPUT_SET(PWBTN_PIN,1); }elseif(i > PWBTN_SHORT_PRESS_TICKS) {GPIO_OUTPUT_SET(PWBTN_PIN,0); short_press_flag =0; i =0; } }elseif(long_press_flag) {if(i++ ==0) {GPIO_OUTPUT_SET(PWBTN_...
Once you've retrieved the PWMOutput for the port you plan to use you need to initialize it to select the PWM function. On this kind of boards, each port can have more than one function (simple GPIO, SPI, PWM, etc...) and you can choose the function you want configuring dedicated re...
PORT_CTRL_OBE_O_D \ (SIUL2_MSCR_S32_G1_SRE_7 | \ SIUL2_MSCR_S32_G1_OBE_EN | \ SIUL2_MSCR_S32_G1_ODE_EN) void gpio_config_pinctrl(void){ /* PA06 pad: GPIO[6] GPO */ mmio_write_32(SIUL2_0_MSCRn(6), SIUL2_MSCR_S32G_G2_PORT_CTRL_OBE_P_P); } void gpio_set_...
*\*\fun main function. *\*\param none. *\*\return none. **/ int main(void) { /* Initialize Led1~Led3 as output push-pull mode */ LED_Initialize(LED1_GPIO_PORT, LED1_GPIO_PIN | LED2_GPIO_PIN | LED3_GPIO_PIN); /* Turn off Led1~Led3 */ ...
output(IO_PORTA_05, 1); //设置IO为输出状态// gpio_set_fun_output_port(IO_PORTA_05, FO_UART0_TX, 1, 1); //将UART0的Tx信号输出到IO_PORTA_05口//===//intgpio_set_fun_output_port(u32gpio,u32fun_index,u8dir_ctl,u8data_ctl);//===...
(BM_LITE_IRQ));ESP_LOGD(TAG,"LOCK_PLATE_FEEDBACK GPIO Level: %d",gpio_get_level(LOCK_PLATE_FEEDBACK));//}//while(1) {//printf("cnt: %d\n", cnt++);//vTaskDelay(1000 / portTICK_RATE_MS);//gpio_set_level(GPIO_OUTPUT_IO_0, cnt % 2);//gpio_set_level(GPIO_OUTPUT_IO_1...
if (xQueueReceive(gpio_evt_queue, &io_num, portMAX_DELAY)) { printf("GPIO[%d] 中断触发, 当前的电压: %d\n", io_num, gpio_get_level(io_num)); } }} void fun_set_gpio_low_interrupt() { //GPIO口结构体定义 gpio_config_t io_conf; //下降沿触发 io_conf.intr_type = GPIO_INTR...