diff --git a/vendor/huanglong/bootloader/source/apps/main/main.c b/vendor/huanglong/bootloader/source/apps/main/main.c index ba47d3583d..e5c7604366 100755 --- a/vendor/huanglong/bootloader/source/apps/main/main.c +++ b/vendor/huanglong/bootloader/source/apps/main/main.c @@ -296,6 +296,38 @@ static td_void slave_boot_app_entry_i2c_init(td_void) uapi_i2c_write(i2c_para, &data, 1); } + +static td_void slave_boot_i2c_amp_init(td_void) +{ + td_u8 data; + i2c_base_para i2c_para = {0}; + + i2c_para.i2c_num = 1; + i2c_para.dev_address = 0x58; + + i2c_para.i2c_reg_addr = 0x00; + i2c_para.reg_addr_count = 1; + data = 0x00; + uapi_i2c_write(i2c_para, &data, 1); + + i2c_para.i2c_reg_addr = 0x7F; + data = 0x00; + uapi_i2c_write(i2c_para, &data, 1); + + i2c_para.i2c_reg_addr = 0x00; + data = 0x00; + uapi_i2c_write(i2c_para, &data, 1); + + + i2c_para.i2c_reg_addr = 0x01; + data = 0x11; + uapi_i2c_write(i2c_para, &data, 1); + + i2c_para.i2c_reg_addr = 0x03; + data = 0x03; + uapi_i2c_write(i2c_para, &data, 1); + +} static td_void ext_boot_logo_main(td_void) { int ret; @@ -351,6 +383,7 @@ static td_s32 slave_boot_app_entry(td_void) #endif slave_boot_app_entry_i2c_init(); + slave_boot_i2c_amp_init(); drv_vibrator_init(); drv_vibrator_wave_output(WT_ON);