#ifndef __ANALOG_H__
#define __ANALOG_H__


#define IC_LOAD 1
#define IC_RECTIFIER 2
#define IC_GAIN 3

#define POSITION_LOAD_S1 1
#define POSITION_LOAD_S2 2
#define POSITION_LOAD_S3 3
#define POSITION_LOAD_S4 4
#define POSITION_LOAD_S5 5
#define POSITION_LOAD_S6 6
#define POSITION_LOAD_S7 7
#define POSITION_LOAD_S8 8
#define POSITION_LOAD_DISABLE 0


#define POSITION_RECTIFIER_S1 1
#define POSITION_RECTIFIER_S2 2
#define POSITION_RECTIFIER_S3 3
#define POSITION_RECTIFIER_S4 4
#define POSITION_RECTIFIER_S5 5
#define POSITION_RECTIFIER_S6 6
#define POSITION_RECTIFIER_S7 7
#define POSITION_RECTIFIER_S8 8
#define POSITION_RECTIFIER_DISABLE 0


#define POSITION_GAIN_S1 1
#define POSITION_GAIN_S2 2
#define POSITION_GAIN_S3 3
#define POSITION_GAIN_S4 4
#define POSITION_GAIN_S5 5
#define POSITION_GAIN_S6 6
#define POSITION_GAIN_S7 7
#define POSITION_GAIN_S8 8
#define POSITION_GAIN_DISABLE 0

#define R_A0_Pin GPIO_PIN_6
#define R_A0_GPIO_Port GPIOA
#define R_A1_Pin GPIO_PIN_7
#define R_A1_GPIO_Port GPIOA
#define R_A2_Pin GPIO_PIN_4
#define R_A2_GPIO_Port GPIOC
#define R_nEN_Pin GPIO_PIN_5
#define R_nEN_GPIO_Port GPIOC
#define L_A0_Pin GPIO_PIN_0
#define L_A0_GPIO_Port GPIOB
#define L_A1_Pin GPIO_PIN_1
#define L_A1_GPIO_Port GPIOB
#define L_A2_Pin GPIO_PIN_2
#define L_A2_GPIO_Port GPIOB
#define L_nEN_Pin GPIO_PIN_10
#define L_nEN_GPIO_Port GPIOB
#define G_A0_Pin GPIO_PIN_6
#define G_A0_GPIO_Port GPIOC
#define G_A1_Pin GPIO_PIN_7
#define G_A1_GPIO_Port GPIOC
#define G_A2_Pin GPIO_PIN_8
#define G_A2_GPIO_Port GPIOC
#define G_nEN_Pin GPIO_PIN_9
#define G_nEN_GPIO_Port GPIOC

void mux( int ic, int position);

#endif