static void send_pulse(uint8_t pulse_count, uint8_t pause_count) { clear_output_pin(); enable_pwm_output(); ir_pulse_count = pulse_count; ir_pause_count = pause_count; state = pulse; }
/** * Turn power supply on. * * @param dummy dummy argument due to ps_module pointer */ static void turn_on(uint16_t dummy) { #ifdef USE_ITLK if(g_ipc_ctom.ps_module[0].ps_status.bit.state == Off) #else if(g_ipc_ctom.ps_module[0].ps_status.bit.state <= Interlock) #endif { reset_controller(); g_ipc_ctom.ps_module[0].ps_status.bit.state = Initializing; PIN_CLOSE_AC_MAINS_CONTACTOR_MOD_A; PIN_CLOSE_AC_MAINS_CONTACTOR_MOD_B; DELAY_US(TIMEOUT_AC_MAINS_CONTACTOR_CLOSED_MS*1000); if(!PIN_STATUS_AC_MAINS_CONTACTOR_MOD_A) { set_hard_interlock(MOD_A_ID, AC_MAINS_CONTACTOR_FAIL); } if(!PIN_STATUS_AC_MAINS_CONTACTOR_MOD_B) { set_hard_interlock(MOD_B_ID, AC_MAINS_CONTACTOR_FAIL); } if(g_ipc_ctom.ps_module[0].ps_status.bit.state == Initializing) { g_ipc_ctom.ps_module[0].ps_status.bit.openloop = OPEN_LOOP; g_ipc_ctom.ps_module[0].ps_status.bit.state = SlowRef; enable_pwm_output(MOD_A_ID); enable_pwm_output(MOD_B_ID); } } }
static void turn_on(uint16_t dummy) { check_capbank_undervoltage(); #ifdef USE_ITLK if(g_ipc_ctom.ps_module[0].ps_status.bit.state == Off) #else if(g_ipc_ctom.ps_module[0].ps_status.bit.state <= Interlock) #endif { reset_controller(); g_ipc_ctom.ps_module[0].ps_status.bit.openloop = OPEN_LOOP; g_ipc_ctom.ps_module[0].ps_status.bit.state = SlowRef; enable_pwm_output(0); enable_pwm_output(1); enable_pwm_output(2); enable_pwm_output(3); enable_pwm_output(4); enable_pwm_output(5); enable_pwm_output(6); enable_pwm_output(7); } }