SECO
−
NCV7685RGB
−
GEVB
6
Firmware Setting
Generally, floating address method is used in firmware;
the configurations can changed in the “ncv7685.h” file. Here
are options:
1. Floating Address method using SOC GPIO:
#define
NCV7675_CHIPS_NUM 0x04
/* Chips number */
#define
PCA9655_Address 0x22
/* PCA9655 I2C address */
#define
BY_SOC 0
/* SOC or PCA9655 */
#define
BY_PCA9655 1
#define
ADDRESS_SETTING BY_SOC
#define
Fix_Address 0
#define
Address_Had_Set 0
2. Floating Address method using PCA9655:
#define
NCV7675_CHIPS_NUM 0x04
/* Chips number */
#define
PCA9655_Address 0x22
/* PCA9655 I2C address */
#define
BY_SOC 0
/* SOC or PCA9655 */
#define
BY_PCA9655 1
#define
ADDRESS_SETTING BY_PCA9655
#define
Fix_Address 0
#define
Address_Had_Set 0
3. Fix Address method using PCA9655 or SOC GPIO:
#define
NCV7675_CHIPS_NUM 0x04
/* Chips number */
#define
PCA9655_Address 0x22
/* PCA9655 I2C address */
#define
BY_SOC 0
#define
BY_PCA9655 1
#define
ADDRESS_SETTING BY_PCA9655
/* SOC or PCA9655 */
#define
Fix_Address 1
#define
Address_Had_Set 0
4. For the board which address had programmed, just set “Address_Had_Set” to 1, So it will skip address setting
function:
#define
NCV7675_CHIPS_NUM 0x04
/* Chips number */
#define
PCA9655_Address 0x22
/* PCA9655 I2C address */
#define
BY_SOC 0
#define
BY_PCA9655 1
#define
ADDRESS_SETTING BY_PCA9655
/* SOC or PCA9655 */
#define
Fix_Address 1
#define
Address_Had_Set 1
Files Structure of Project
Figure 11. Files Structure of Project
·app_basc.c: Battery level indication handler
·app_bass.c: Battery Service code
·app_config.c: Application configuration source file
·app_customss.c: Bluetooth custom service
·app_msg_handler.c: Customer defined functions and data
·app_trace.c: Trace functions
·ncv7685.c: APIs of NCV7685 Chip and Board
·app.c: main function