#ifndef __GUN_PORT_H__
#define __GUN_PORT_H__
#include <stdio.h>
#include <stdint.h>

typedef enum LEDID
{
    LED_RED = 0,
    LED_BLUE,
    LED_GREEN
}LEDID_t;

int gunA_Get_HomeState(void *self);
int gunA_Get_FuseState(void *self);

int gunA_Get_ELock(void *self);
void gunA_Set_ELock(void *self, int on);
int gunA_Set_ELock_State(void* self, int on, int timeout);

void gunA_Set_K1(void *self, int on);
void gunA_Set_K2(void *self, int on);
int gunA_Get_K1(void *self);
int gunA_Get_K2(void *self);
int gunA_Set_K1K2_State(void* self, int on, int timeout);

int gunA_Set_Aux12V(void* self, int on);

float gunA_Get_CC1_Voltage(void* self);
float gunA_Get_CP_Voltage(void* self, uint32_t *cp_state);
float gunA_Get_PP_Voltage(void* self);

void gunA_Set_PWM(void* self, int ratio);
void gunA_Set_LEDState(void *self, int LEDID, int on);
void gunA_Set_LEDToggle(void *self, int LEDID);

int sys_GUNA_init(void);
void sys_GUNA_exit(void);

int gunB_Get_HomeState(void *self);
int gunB_Get_FuseState(void *self);

int gunB_Get_ELock(void *self);
void gunB_Set_ELock(void *self, int on);
int gunB_Set_ELock_State(void* self, int on, int timeout);

void gunB_Set_K1(void *self, int on);
void gunB_Set_K2(void *self, int on);
int gunB_Get_K1(void *self);
int gunB_Get_K2(void *self);
int gunB_Set_K1K2_State(void* self, int on, int timeout);

int gunB_Set_Aux12V(void* self, int on);

float gunB_Get_CC1_Voltage(void* self);
float gunB_Get_CP_Voltage(void* self, uint32_t *cp_state);
float gunB_Get_PP_Voltage(void* self);

void gunB_Set_PWM(void* self, int ratio);
void gunB_Set_LEDState(void *self, int LEDID, int on);
void gunB_Set_LEDToggle(void *self, int LEDID);

int sys_GUNB_init(void);
void sys_GUNB_exit(void);


#endif//__GUN_PORT_H__
