Skip to content

Commit

Permalink
(Continued)
Browse files Browse the repository at this point in the history
  • Loading branch information
wberube committed May 30, 2024
1 parent 72a89a0 commit e2459c8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/hal/inge/tx_hal.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ int tx_system_init(char *sensor)
}

for (char i = 0; i < sizeof(tx_sensors) / sizeof(*tx_sensors); i++) {
if (strcmp(sensor, tx_sensors[i].name)) continue;
_tx_isp_snr = tx_sensors[i];
if (strcmp(tx_sensors[i].name, sensor)) continue;
memcpy(&_tx_isp_snr, &tx_sensors[i], sizeof(tx_isp_snr));
ret = 0;
break;
}
Expand Down
2 changes: 1 addition & 1 deletion src/hal/inge/tx_isp.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ typedef struct {
} tx_isp_snr;

static tx_isp_snr tx_sensors[] = {
{ .name = "sc2335", .spiMode = 0, .i2c.type = "sc2335", .i2c.addr = 0x30,
{ .name = "sc2335", .spiMode = 0, .i2c.type = "sc2335", .i2c.addr = 0x60,
.rstPin = 18, .powDownPin = -1, .powUpPin = -1 }
};

Expand Down
8 changes: 4 additions & 4 deletions src/hal/inge/tx_sys.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ static int tx_sys_load(tx_sys_impl *sys_lib) {
}

if (!(sys_lib->fnBind = (int(*)(tx_sys_bind *source, tx_sys_bind *dest))
dlsym(sys_lib->handle, "HI_MPI_SYS_Bind"))) {
fprintf(stderr, "[tx_sys] Failed to acquire symbol HI_MPI_SYS_Bind!\n");
dlsym(sys_lib->handle, "IMP_System_Bind"))) {
fprintf(stderr, "[tx_sys] Failed to acquire symbol IMP_System_Bind!\n");
return EXIT_FAILURE;
}

if (!(sys_lib->fnUnbind = (int(*)(tx_sys_bind *source, tx_sys_bind *dest))
dlsym(sys_lib->handle, "HI_MPI_SYS_UnBind"))) {
fprintf(stderr, "[tx_sys] Failed to acquire symbol HI_MPI_SYS_UnBind!\n");
dlsym(sys_lib->handle, "IMP_System_UnBind"))) {
fprintf(stderr, "[tx_sys] Failed to acquire symbol IMP_System_UnBind!\n");
return EXIT_FAILURE;
}

Expand Down
4 changes: 4 additions & 0 deletions src/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ int start_sdk() {
case HAL_PLATFORM_I6E: ret = i6_hal_init(); break;
case HAL_PLATFORM_I6C: ret = i6c_hal_init(); break;
case HAL_PLATFORM_I6F: ret = i6f_hal_init(); break;
case HAL_PLATFORM_T21:
case HAL_PLATFORM_T31: ret = tx_hal_init(); break;
case HAL_PLATFORM_V4: ret = v4_hal_init(); break;
}
if (ret) {
Expand All @@ -185,6 +187,8 @@ int start_sdk() {
case HAL_PLATFORM_I6E: ret = i6_system_init(); break;
case HAL_PLATFORM_I6C: ret = i6c_system_init(); break;
case HAL_PLATFORM_I6F: ret = i6f_system_init(); break;
case HAL_PLATFORM_T21:
case HAL_PLATFORM_T31: ret = tx_system_init("sc2335"); break;
case HAL_PLATFORM_V4: ret = v4_system_init(app_config.sensor_config); break;
}
if (ret) {
Expand Down

0 comments on commit e2459c8

Please sign in to comment.