对GPIO0操作不成功

yulihui2683685
Posts: 4
Joined: Sun Nov 19, 2017 6:36 pm

对GPIO0操作不成功

Postby yulihui2683685 » Mon Nov 20, 2017 9:35 pm

I have the following few lines of code, but can not achieve high output, How to get high output?request help, thank you!
GPIO_ConfigTypeDef gpio_out_cfg;
gpio_out_cfg.GPIO_Mode = GPIO_Mode_Output;
gpio_out_cfg.GPIO_Pin = GPIO_Pin_0;
gpio_config(&gpio_out_cfg);
GPIO_OUTPUT_SET(GPIO_ID_PIN(0), 1);

Her Mary
Posts: 537
Joined: Mon Oct 27, 2014 11:09 am

Re: 对GPIO0操作不成功

Postby Her Mary » Wed Nov 22, 2017 3:33 pm

Maybe those examples can help you esp8266-rtos-sample-code/02Peripheral

yulihui2683685
Posts: 4
Joined: Sun Nov 19, 2017 6:36 pm

Re: 对GPIO0操作不成功

Postby yulihui2683685 » Wed Nov 22, 2017 9:45 pm

I've tried this example, but still no success, do not know why
GPIO_ConfigTypeDef io_out_conf;
io_out_conf.GPIO_IntrType = GPIO_PIN_INTR_DISABLE;
io_out_conf.GPIO_Mode = GPIO_Mode_Output;
io_out_conf.GPIO_Pin = GPIO_Pin_0;
io_out_conf.GPIO_Pullup = GPIO_PullUp_DIS;
gpio_config(&io_out_conf);
GPIO_OUTPUT_SET(GPIO_Pin_0, 1);

Who is online

Users browsing this forum: No registered users and 295 guests