然后拷贝 io 例程的 代码 程序跑起来 串口输出 正常 可是 io 的电平没有变化
- void app_main(void)
- {
- gpio_config_t io_conf = {};
- uint8_t flag=0;
- printf("Hello world!\n");
- io_conf.intr_type=GPIO_INTR_DISABLE;
- io_conf.pin_bit_mask=(1ULL<<18)|(1ULL<<19);
- io_conf.mode=GPIO_MODE_OUTPUT;
- //disable pull-down mode
- io_conf.pull_down_en = 0;
- //disable pull-up mode
- io_conf.pull_up_en = 0;
- //configure GPIO with the given settings
- gpio_config(&io_conf);
- do{
- printf("Hello%d\n", flag);
- gpio_set_level(1<<1, flag);
- flag^=1;
- vTaskDelay(5000 / portTICK_PERIOD_MS);
- }while(1);
- }