コード例 #1
0
ファイル: plug.c プロジェクト: Zhang-Jia/tisan-demo
void ICACHE_FLASH_ATTR
plug_set(struct plug* value) {
	// TODO: implement object set function here.
	// the set function read value and operate the hardware.
	peri_jdq_set(value->off_on);

}
コード例 #2
0
void ICACHE_FLASH_ATTR
plug_pwm_set(struct plug_pwm* value) {
	// TODO: implement object set function here.
	// the set function read value and operate the hardware.
	PRINTF("peri_jdq_set start.\n");
	peri_jdq_set(value->off_on);
	PRINTF("peri_jdq_set over.\n");

	//add plug_pwm action
	//peri_plug_pwm_start(20);
	PRINTF("peri_plug_pwm_start start.:%d\n",value->off_on);
	if(value->off_on == 0)
	{
		peri_plug_pwm_param_timer_set();
	}
	else
	{
		peri_plug_pwm_start(60);
	}
}