Skip to content

Commit

Permalink
Merge pull request #2650 from NTULINUX/hal_lib-rtai-fix
Browse files Browse the repository at this point in the history
RTAI: Fix undefined symbols in hal_lib
  • Loading branch information
andypugh authored Sep 21, 2023
2 parents 196fd2d + c08d414 commit cdfd70c
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions src/hal/hal_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1378,6 +1378,17 @@ int hal_param_s32_new(const char *name, hal_param_dir_t dir, hal_s32_t * data_ad
return hal_param_new(name, HAL_S32, dir, (void *) data_addr, comp_id);
}

int hal_param_u64_new(const char *name, hal_param_dir_t dir, hal_u64_t * data_addr,
int comp_id)
{
return hal_param_new(name, HAL_U64, dir, (void *) data_addr, comp_id);
}
int hal_param_s64_new(const char *name, hal_param_dir_t dir, hal_s64_t * data_addr,
int comp_id)
{
return hal_param_new(name, HAL_S64, dir, (void *) data_addr, comp_id);
}

static int hal_param_newfv(hal_type_t type, hal_param_dir_t dir,
void *data_addr, int comp_id, const char *fmt, va_list ap) {
char name[HAL_NAME_LEN + 1];
Expand Down Expand Up @@ -1436,6 +1447,27 @@ int hal_param_s32_newf(hal_param_dir_t dir, hal_s32_t * data_addr,
return ret;
}

int hal_param_u64_newf(hal_param_dir_t dir, hal_u64_t * data_addr,
int comp_id, const char *fmt, ...)
{
va_list ap;
int ret;
va_start(ap, fmt);
ret = hal_param_newfv(HAL_U64, dir, (void*)data_addr, comp_id, fmt, ap);
va_end(ap);
return ret;
}

int hal_param_s64_newf(hal_param_dir_t dir, hal_s64_t * data_addr,
int comp_id, const char *fmt, ...)
{
va_list ap;
int ret;
va_start(ap, fmt);
ret = hal_param_newfv(HAL_S64, dir, (void*)data_addr, comp_id, fmt, ap);
va_end(ap);
return ret;
}

/* this is a generic function that does the majority of the work. */

Expand Down

0 comments on commit cdfd70c

Please sign in to comment.