/* 
 * File:   ChaletPowerRelay.h
 * Author: JF
 *
 * Created on November 30, 2018, 7:33 PM
 */

#ifndef CHALETPOWERRELAY_H
#define	CHALETPOWERRELAY_H
#include "define.h"

#define CHALET_OFFLINE_POWER_RELAY_RESET_TIMEOUT 43200 //43,200 = 12 hours in seconds

enum eChaletPowerRelayState
{
    CHALET_POWER_RELAY_OFF_STATE = 0,
    CHALET_POWER_RELAY_ON_STATE,
    CHALET_POWER_RELAY_UNKNOWN_STATE
};

#define CHALET_12V_POWER_STATE_ON 0
#define CHALET_12V_POWER_STATE_OFF 1

#define CHALET_POWER_RELAY_COIL_TIMEOUT 200  //ms

void InitChaletPowerRelay();

void ChaletPowerRelayTick();
bool ChaletPowerRelayTurnOn();
bool ChaletPowerRelayTurnOff();
char GetChaletPowerRelayState();
void ChaletPowerRelayKickTimer();



#endif	/* CHALETPOWERRELAY_H */

