Skip to content

Commit

Permalink
(Continued)
Browse files Browse the repository at this point in the history
  • Loading branch information
wberube committed Aug 30, 2024
1 parent a127be3 commit 0225d26
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
5 changes: 1 addition & 4 deletions src/hal/plus/ak_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,4 @@
#include "../symbols.h"
#include "../types.h"

typedef struct {
int width;
int height;
} ak_common_dim;
#define CVI_VI_CHN_NUM 2
10 changes: 7 additions & 3 deletions src/hal/plus/ak_vi.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

#include "ak_common.h"

#define CVI_VI_CHN_NUM 2

typedef struct {
int x;
int y;
Expand All @@ -26,6 +24,8 @@ typedef struct {
typedef struct {
void *handle;

int (*fnLoadSensorConfig)(char *path);

int (*fnDisableDevice)(void *device);
void* (*fnEnableDevice)(int device);
int (*fnGetDeviceConfig)(void *device, ak_vi_cnf *config);
Expand All @@ -40,8 +40,12 @@ static int ak_vi_load(ak_vi_impl *vi_lib) {
if (!(vi_lib->handle = dlopen("libplat_vi.so", RTLD_LAZY | RTLD_GLOBAL)))
HAL_ERROR("ak_vi", "Failed to load library!\nError: %s\n", dlerror());

if (!(vi_lib->fnLoadSensorConfig = (int(*)(char *path))
hal_symbol_load("ak_vi", vi_lib->handle, "ak_vi_match_sensor")))
return EXIT_FAILURE;

if (!(vi_lib->fnDisableDevice = (int(*)(void* device))
hal_symbol_load("ak_vi", vi_lib->handle, "ak_venc_close")))
hal_symbol_load("ak_vi", vi_lib->handle, "ak_vi_close")))
return EXIT_FAILURE;

if (!(vi_lib->fnEnableDevice = (void*(*)(int device))
Expand Down

0 comments on commit 0225d26

Please sign in to comment.