Z
@ccc
pmu_set_port_mux(GPIO_PORT_D,GPIO_BIT_6,PMU_PORT_MUX_GPIO);
pmu_set_pin_to_PMU(GPIO_PORT_D,BIT(6));
pmu_set_pin_dir(GPIO_PORT_D,BIT(6), GPIO_DIR_OUT);
pmu_set_pin_pull(GPIO_PORT_D,BIT(6), false);
pmu_set_gpio_value(GPIO_PORT_D, BIT(6), 1);
co_delay_100us(1000);
pmu_set_gpio_value(GPIO_PORT_D, BIT(6), 0);
和
system_set_port_mux(GPIO_PORT_D,GPIO_BIT_6,PORTD6_FUNC_D6);
system_set_port_mux(GPIO_PORT_D,GPIO_BIT_5,PORTD5_FUNC_D5);
pmu_set_pin_to_CPU(GPIO_PORT_D,BIT(6));
gpio_set_dir(GPIO_PORT_D, GPIO_BIT_6, GPIO_DIR_OUT);
gpio_set_dir(GPIO_PORT_D, GPIO_BIT_5, GPIO_DIR_OUT);
gpio_set_pin_value(GPIO_PORT_D,GPIO_BIT_6,1);
co_delay_100us(1000);
gpio_set_pin_value(GPIO_PORT_D,GPIO_BIT_6,0);
你跑下我的代码,这是两种方式,一种是cpu控制的一种是pmu控制的