在git上更新吧,大家都可以下载:)
A
Aming
@Aming
0
声望
11
帖子
1327
资料浏览
0
粉丝
0
关注
Aming 发布的帖子
-
RE: 关于系统待机/进入睡眠?
pmu_set_pin_pull(GPIO_PORT_A,1<<GPIO_BIT_0,true);
pmu_set_pin_to_PMU(GPIO_PORT_A,GPIO_PA0);
pmu_port_wakeup_func_set(GPIO_PA0);
system_power_off(true); 可以了 -
关于系统待机/进入睡眠?
if (msg.button_type==BUTTON_LONG_PRESSED) { co_printf("BUTTON_LONG_PRESSED \r\n"); //no BUTTON_LONG_PRESSED CloseBackLight(); }else if (msg.button_type==BUTTON_LONG_RELEASED || msg.button_type==BUTTON_LONG_LONG_RELEASED) { co_printf("BUTTON_RELEASED \r\n"); //no BUTTON_LONG_PRESSED pmu_port_wakeup_func_set(GPIO_PA0); system_sleep_enable(); //system_power_off(false); 进入睡眠按键不能唤醒? 这个地方还需要做哪些处理? 谢谢 }
-
4组adc 采样? 代码有问题吗? 延时够吗?
struct adc_cfg_t cfg;
memset((void*)&cfg, 0, sizeof(cfg)); cfg.src = ADC_TRANS_SOURCE_PAD; cfg.ref_sel = ADC_REFERENCE_AVDD; cfg.channels = 0x0F; //4 ADC1,2,3,4 cfg.route.pad_to_sample = 1; cfg.clk_sel = ADC_SAMPLE_CLK_24M_DIV13; cfg.clk_div = 0x3f; adc_init(&cfg); adc_enable(NULL, NULL, 0); co_delay_100us(5000); TemperatureAdcValue=1023; adc_get_result(ADC_TRANS_SOURCE_PAD,1,&TemperatureAdcValue); co_printf("TemperatureAdcValue1 %d\r\n",TemperatureAdcValue); co_delay_100us(1000); TemperatureAdcValue=1023; adc_get_result(ADC_TRANS_SOURCE_PAD,2,&TemperatureAdcValue); co_delay_100us(1000); TemperatureAdcValue=1023; adc_get_result(ADC_TRANS_SOURCE_PAD,4,&TemperatureAdcValue); co_printf("TemperatureAdcValue3 %d\r\n",TemperatureAdcValue); co_delay_100us(1000); TemperatureAdcValue=1023; adc_get_result(ADC_TRANS_SOURCE_PAD,8,&TemperatureAdcValue); adc_disable();