#ifndef RF_SWITCH_DRIVER_H_
#define RF_SWITCH_DRIVER_H_

#include "stdint.h"
#include "stdio.h"
#ifndef RF_SWITCH_MODEL
#define RF_SWITCH_MODEL HMC253
#endif

typedef enum 
{
#if RF_SWITCH_MODEL == HMC253
	RF_OUT_01 = 0,
	RF_OUT_02 = 1,
	RF_OUT_03 = 2,
	RF_OUT_04 = 3,
	RF_OUT_05 = 4,
	RF_OUT_06 = 5,
	RF_OUT_07 = 6,
	RF_OUT_08 = 7
#endif
} RF_OUT_ENUM;

struct rf_switch_config
{		
	uint8_t enable;
	RF_OUT_ENUM rfOutState;	
	uint32_t portA;
	uint32_t pinA;
	uint32_t portB;
	uint32_t pinB;
	uint32_t portC;
	uint32_t pinC;
	uint32_t portEn;
	uint32_t pinEn;
};

void vRFSwitchInit(struct rf_switch_config *pConfig,
																		uint32_t portA, 
																		uint32_t pinA, 
																		uint32_t portB, 
																		uint32_t pinB, 
																		uint32_t portC, 
																		uint32_t pinC,
																		uint32_t portEn,
																		uint32_t pinEn);

void vRFSwitchEnable(struct rf_switch_config *pConfig);
void vRFSwitchDisable(struct rf_switch_config *pConfig);
RF_OUT_ENUM xRFSwitchSet(struct rf_switch_config *pConfig, RF_OUT_ENUM state);
RF_OUT_ENUM xRFSwitchGetState(struct rf_switch_config *pConfig);

#endif /*RF_SWITCH_DRIVER_H_*/
