/*
 * BDA4601.h
 *
 *  Created on: 2019. 6. 28.
 *      Author: parkyj
 */

#ifndef BDA4601_H_
#define BDA4601_H_
#include "main.h"
typedef struct{
   GPIO_TypeDef *CLK_PORT;
   uint16_t CLK_PIN;

   GPIO_TypeDef *SERIAL_IN_PORT;
   uint16_t SERIAL_IN_PIN;;

   GPIO_TypeDef *LE_PORT;
   uint16_t LE_PIN;

}BDA4601_st;
BDA4601_st BDA4601_1_8G_DL1;
BDA4601_st BDA4601_1_8G_DL2;
BDA4601_st BDA4601_1_8G_UL1;
BDA4601_st BDA4601_1_8G_UL2;
BDA4601_st BDA4601_1_8G_UL3;    
BDA4601_st BDA4601_1_8G_UL4;          

BDA4601_st BDA4601_2_1G_DL1;
BDA4601_st BDA4601_2_1G_DL2;           
BDA4601_st BDA4601_2_1G_UL1;           
BDA4601_st BDA4601_2_1G_UL2;           
BDA4601_st BDA4601_2_1G_UL3;           
BDA4601_st BDA4601_2_1G_UL4;    

void BDA4601_atten_ctrl(BDA4601_st type ,uint8_t data);
void BDA4601_Initialize(void);

uint8_t BDA4601_Data_Calc(uint8_t val);

//void BDA4601_Test(void);

#endif /* BDA4601_H_ */
