#include "TYW_stdint.h"

/*SGM4591Q片选*/
typedef enum
{
  SGM4591Q_Chip1_1 = 0,
  SGM4591Q_Chip1_2,
  SGM4591Q_Chip1_3,
  SGM4591Q_Chip1_4,
  SGM4591Q_Chip2_1,
  SGM4591Q_Chip2_2,
  SGM4591Q_Chip2_3,
  SGM4591Q_Chip2_4,
  SGM4591Q_Chip3_1,
  SGM4591Q_Chip3_2,
  SGM4591Q_Chip3_3,
  SGM4591Q_Chip3_4,
  SGM4591Q_Chip4_1,
  SGM4591Q_Chip4_2,
  SGM4591Q_Chip4_3,
  SGM4591Q_Chip4_4,
} SGM4591Q_Chip;

/*SGM4591Q段选*/
typedef enum
{
  SGM4591Q_Segment0 = 0,
  SGM4591Q_Segment1,
} SGM4591Q_Segment;

/*SGM4591Q端口*/
#define SGM4591Q_PIN0       0x01u
#define SGM4591Q_PIN1       0x02u
#define SGM4591Q_PIN2       0x04u
#define SGM4591Q_PIN3       0x08u
#define SGM4591Q_PIN4       0x10u
#define SGM4591Q_PIN5       0x20u
#define SGM4591Q_PIN6       0x40u
#define SGM4591Q_PIN7       0x80u

extern uint16_t ADC_4;
void SGM4591Q_IIC_Send(uint8_t Address,uint8_t Register,uint8_t Function);
void SGM4591Q_Control(void);
