DVT
This commit is contained in:
44
A5H_9225_8108_SPIV3.0/APP/bfi/BfiApi.c
Normal file
44
A5H_9225_8108_SPIV3.0/APP/bfi/BfiApi.c
Normal file
@@ -0,0 +1,44 @@
|
||||
#include "BfiApi.h"
|
||||
#include "UserApi.h"
|
||||
#include "stdio.h"
|
||||
#include "string.h"
|
||||
#include "xtal.h"
|
||||
#include "bl_ic_config.h"
|
||||
#include "SpbApi.h"
|
||||
#include "SpbDriverApi.h"
|
||||
#include "FbApi.h"
|
||||
|
||||
BFI_CTRL_T bfiCtrl;
|
||||
uint8_t bfi_debug_flag = 0;
|
||||
|
||||
#if (MODEL_TYPE== A5H_85_28_16_448_HY8108)
|
||||
CFGBUFSTRUCT_T ChannelEnableTable[MAXDIP] =
|
||||
{
|
||||
{0x00ff,0x00ff,0x00ff,0x00ff,0x0000,0x0000},//dip1
|
||||
{0x00ff,0x00ff,0x00ff,0x00ff,0x0000,0x0000},//dip2
|
||||
{0x00ff,0x00ff,0x00ff,0x00ff,0x0000,0x0000},//dip3
|
||||
{0x00ff,0x00ff,0x00ff,0x00ff,0x0000,0x0000},//dip4
|
||||
{0x00ff,0x00ff,0x00ff,0x00ff,0x0000,0x0000},//dip5
|
||||
{0x00ff,0x00ff,0x00ff,0x00ff,0x0000,0x0000},//dip6
|
||||
{0x00ff,0x00ff,0x00ff,0x00ff,0x0000,0x0000},//dip7
|
||||
{0x00ff,0x00ff,0x00ff,0x00ff,0x0000,0x0000},//dip8
|
||||
{0x00ff,0x00ff,0x00ff,0x00ff,0x00ff,0x00ff},//dip9
|
||||
{0x00ff,0x00ff,0x00ff,0x00ff,0x00ff,0x00ff},//dip10
|
||||
{0x00ff,0x00ff,0x00ff,0x00ff,0x00ff,0x00ff},//dip11
|
||||
{0x00ff,0x00ff,0x00ff,0x00ff,0x00ff,0x00ff},//dip12
|
||||
};
|
||||
#elif (MODEL_TYPE== A5HP_65_40_22_880_HY8108)
|
||||
CFGBUFSTRUCT_T ChannelEnableTable[MAXDIP] =
|
||||
{
|
||||
{0x007f,0x00ff,0x007e,0x00ff,0x00ff,0x007f,0x007f,0x00ff,0x007e,0x00ff,0x00ff,0x007f},//dip1
|
||||
{0x007f,0x00ff,0x007e,0x00ff,0x00ff,0x007f,0x007f,0x00ff,0x007e,0x00ff,0x00ff,0x007f},//dip2
|
||||
{0x007f,0x00ff,0x007e,0x00ff,0x00ff,0x007f,0x007f,0x00ff,0x007e,0x00ff,0x00ff,0x007f},//dip3
|
||||
{0x007f,0x00ff,0x007e,0x00ff,0x00ff,0x007f,0x007f,0x00ff,0x007e,0x00ff,0x00ff,0x007f},//dip4
|
||||
{0x007f,0x00ff,0x007e,0x00ff,0x00ff,0x007f,0x007f,0x00ff,0x007e,0x00ff,0x00ff,0x007f},//dip5
|
||||
{0x007f,0x00ff,0x007e,0x00ff,0x00ff,0x007f,0x007f,0x00ff,0x007e,0x00ff,0x00ff,0x007f},//dip6
|
||||
{0x007f,0x00ff,0x007e,0x00ff,0x00ff,0x007f,0x007f,0x00ff,0x007e,0x00ff,0x00ff,0x007f},//dip7
|
||||
{0x007f,0x00ff,0x007e,0x00ff,0x00ff,0x007f,0x007f,0x00ff,0x007e,0x00ff,0x00ff,0x007f},//dip8
|
||||
{0x007f,0x00ff,0x007e,0x00ff,0x00ff,0x007f,0x007f,0x00ff,0x007e,0x00ff,0x00ff,0x007f},//dip9
|
||||
{0x007f,0x00ff,0x007e,0x00ff,0x00ff,0x007f,0x007f,0x00ff,0x007e,0x00ff,0x00ff,0x007f},//dip10
|
||||
};
|
||||
#endif
|
||||
30
A5H_9225_8108_SPIV3.0/APP/bfi/BfiApi.c.orig
Normal file
30
A5H_9225_8108_SPIV3.0/APP/bfi/BfiApi.c.orig
Normal file
@@ -0,0 +1,30 @@
|
||||
#include "BfiApi.h"
|
||||
#include "UserApi.h"
|
||||
#include "stdio.h"
|
||||
#include "string.h"
|
||||
#include "xtal.h"
|
||||
#include "bl_ic_config.h"
|
||||
#include "SpbApi.h"
|
||||
#include "SpbDriverApi.h"
|
||||
#include "FbApi.h"
|
||||
|
||||
BFI_CTRL_T bfiCtrl;
|
||||
uint8_t bfi_debug_flag = 0;
|
||||
|
||||
|
||||
CFGBUFSTRUCT_T ChannelEnableTable[MAXDIP] =
|
||||
{
|
||||
{0x00ff,0x00ff,0x00ff,0x00ff,0x0000,0x0000},//dip1
|
||||
{0x00ff,0x00ff,0x00ff,0x00ff,0x0000,0x0000},//dip2
|
||||
{0x00ff,0x00ff,0x00ff,0x00ff,0x0000,0x0000},//dip3
|
||||
{0x00ff,0x00ff,0x00ff,0x00ff,0x0000,0x0000},//dip4
|
||||
{0x00ff,0x00ff,0x00ff,0x00ff,0x0000,0x0000},//dip5
|
||||
{0x00ff,0x00ff,0x00ff,0x00ff,0x0000,0x0000},//dip6
|
||||
{0x00ff,0x00ff,0x00ff,0x00ff,0x0000,0x0000},//dip7
|
||||
{0x00ff,0x00ff,0x00ff,0x00ff,0x0000,0x0000},//dip8
|
||||
{0x00ff,0x00ff,0x00ff,0x00ff,0x00ff,0x00ff},//dip9
|
||||
{0x00ff,0x00ff,0x00ff,0x00ff,0x00ff,0x00ff},//dip10
|
||||
{0x00ff,0x00ff,0x00ff,0x00ff,0x00ff,0x00ff},//dip11
|
||||
{0x00ff,0x00ff,0x00ff,0x00ff,0x00ff,0x00ff},//dip12
|
||||
};
|
||||
|
||||
121
A5H_9225_8108_SPIV3.0/APP/bfi/BfiApi.h
Normal file
121
A5H_9225_8108_SPIV3.0/APP/bfi/BfiApi.h
Normal file
@@ -0,0 +1,121 @@
|
||||
#ifndef __BFIAPI_H__
|
||||
#define __BFIAPI_H__
|
||||
|
||||
#include "stdint.h"
|
||||
#include "bl_ic_config.h"
|
||||
|
||||
#define SECTION_NUMBER 2
|
||||
#define SECTION_4SEC_DST_FULL_OFFSET 1000
|
||||
#define SECTION_4SEC_DST_HALF_OFFSET 500
|
||||
#define BFI_PWRNO 15
|
||||
#define BFI_CASCADE 32
|
||||
|
||||
#define BFI_LEVEL_BIT_POS 10
|
||||
#define BFI_LEVEL_MASK 0x0003
|
||||
#define BFI_LEVEL_OFF 0
|
||||
#define BFI_LEVEL_LOW 1
|
||||
#define BFI_LEVEL_MIDDLE 2
|
||||
#define BFI_LEVEL_HIGH 3
|
||||
|
||||
#define BFI_FREQUENCY_BIT_POS 1
|
||||
#define BFI_FREQUENCY_MASK 0x0003
|
||||
#define BFI_FREQUENCY_120HZ 0
|
||||
#define BFI_FREQUENCY_100HZ 1
|
||||
#define BFI_FREQUENCY_XXHZ 2
|
||||
#define BFI_FREQUENCY_60HZ 3
|
||||
|
||||
#define ZERO_DELAY_BIT_POS 12
|
||||
#define ZERO_DELAY_MASK (1 << ZERO_DELAY_BIT_POS)
|
||||
#define ZERO_DELAY_ENABLE (1 << ZERO_DELAY_BIT_POS)
|
||||
#define ZERO_DELAY_DISABLE (0 << ZERO_DELAY_BIT_POS)
|
||||
|
||||
#define SUBFRAME_INDEX_BIT_POS 4
|
||||
#define SUBFRAME_INDEX_MASK 0x0003
|
||||
#define MAX_SUBFRAME_INDEX 1
|
||||
|
||||
#define SUBFRAME_TYPE_1SECTION 1
|
||||
#define SUBFRAME_TYPE_2SECTION 2
|
||||
|
||||
typedef enum {
|
||||
BFI_MODE_NONE = 0,
|
||||
BFI_MODE_FREQ_120HZ = 1,
|
||||
BFI_MODE_FREQ_100HZ = 2,
|
||||
BFI_MODE_FREQ_60HZ = 3,
|
||||
BFI_MODE_FREQ_MAX
|
||||
} BFI_MODE_E;
|
||||
|
||||
typedef enum {
|
||||
BFI_MODE_LEVEL_HIGH = 0,
|
||||
BFI_MODE_LEVEL_MIDDLE = 1,
|
||||
BFI_MODE_LEVEL_LOW = 2,
|
||||
BFI_MODE_LEVEL_MAX
|
||||
} BFI_LEVEL_E;
|
||||
|
||||
typedef enum {
|
||||
ZERO_DELAY_MODE_DISABLE = 0,
|
||||
ZERO_DELAY_MODE_ENABLE = 1,
|
||||
ZERO_DELAY_MODE_MAX
|
||||
} ZERO_DELAY_MODE_E;
|
||||
|
||||
typedef struct _BFI_CTRL_T {
|
||||
BFI_MODE_E freqCurr;
|
||||
BFI_MODE_E freqNext;
|
||||
BFI_LEVEL_E levelCurr;
|
||||
BFI_LEVEL_E levelNext;
|
||||
ZERO_DELAY_MODE_E zeroDelayCurr;
|
||||
ZERO_DELAY_MODE_E zeroDelayNext;
|
||||
} BFI_CTRL_T;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint16_t initDelay;
|
||||
uint16_t deltaDelay;
|
||||
uint16_t maxDelay;
|
||||
uint16_t marginDelay;
|
||||
uint8_t isZeroDelay;
|
||||
} CHIP_DELAY_CAL_PARAMETER_T;
|
||||
|
||||
typedef struct _BFI_LEVEL_PARAM_T {
|
||||
uint16_t delayInit; //unit 8*Tp_osc
|
||||
uint16_t blkNum; //unit pwm period
|
||||
} BFI_LVEVL_PARAM_T;
|
||||
|
||||
typedef struct _BFI_PARAM_T {
|
||||
uint16_t delayMax; //unit 8*Tp_osc
|
||||
uint16_t delayStep; //unit 8*Tp_osc
|
||||
uint16_t delayMargin; //unit 8*Tp_osc
|
||||
uint8_t isZeroDelay; //zeroDelay-0;normalDelay-1
|
||||
BFI_LVEVL_PARAM_T lvlParam[BFI_MODE_LEVEL_MAX];
|
||||
} BFI_PARAM_T;
|
||||
|
||||
typedef enum {
|
||||
CHANNAL1 = 0,
|
||||
CHANNAL2,
|
||||
CHANNAL3,
|
||||
CHANNAL4,
|
||||
CHANNAL5,
|
||||
CHANNAL6,
|
||||
CHANNAL7,
|
||||
CHANNAL8
|
||||
} CHANNAL_TYPE_E;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint16_t CfgBuf[MAXICNO];
|
||||
} CFGBUFSTRUCT_T;
|
||||
|
||||
extern BFI_PARAM_T bfiNormalParamNone;
|
||||
extern BFI_PARAM_T bfiNormalParam120Hz;
|
||||
extern BFI_PARAM_T bfiZeroDelayParam120Hz;
|
||||
extern BFI_PARAM_T bfiNormalParam100Hz;
|
||||
extern BFI_PARAM_T bfiZeroDelayParam100Hz;
|
||||
|
||||
extern uint8_t bfi_debug_flag;
|
||||
extern BFI_CTRL_T bfiCtrl;
|
||||
extern void Bcon_BfiParameterChangeCheck(void);
|
||||
extern uint8_t Bcon_Bfi_Mode_Set(uint8_t useLock);
|
||||
|
||||
extern CFGBUFSTRUCT_T ChannelEnableTable[MAXDIP];
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user