hal_param_new − Create a HAL parameter
int hal_param_bit_new(const char *name, hal_param_dir_t dir, hal_bit_t * data_addr, int comp_id)
int hal_param_float_new(const char *name, hal_param_dir_t dir, hal_float_t * data_addr, int comp_id)
int hal_param_u32_new(const char *name, hal_param_dir_t dir, hal_u32_t * data_addr, int comp_id)
int hal_param_s32_new(const char *name, hal_param_dir_t dir, hal_s32_t * data_addr, int comp_id)
int hal_param_bit_newf(hal_param_dir_t dir, hal_bit_t * data_addr, int comp_id, const char *fmt, ...)
int hal_param_float_newf(hal_param_dir_t dir, hal_float_t * data_addr, int comp_id, const char *fmt, ...)
int hal_param_u32_newf(hal_param_dir_t dir, hal_u32_t * data_addr, int comp_id, const char *fmt, ...)
int hal_param_s32_newf(hal_param_dir_t dir, hal_s32_t * data_addr, int comp_id, const char *fmt, ...)
int hal_param_new(const char *name, hal_type_t type, hal_param_dir_t dir, void *data_addr, int comp_id)
data_addr
The address of the data, which must lie within memory allocated by hal_malloc.
comp_id
A HAL component identifier returned by an earlier call to hal_init.
fmt, ...
A printf-style format string and arguments
type |
The type of the parameter, as specified in hal_type_t(3hal). |
The hal_param_new family of functions create a new param object.
There are functions for each of the data types that the HAL supports. Pins may only be linked to signals of the same type.
Returns a HAL status code.
hal_type_t(3hal)