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); }
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); } }