zephyr/boards/posix/nrf52_bsim/argparse.h
Alberto Escolar Piedras ce12abd9e4 nrf52_bsim: Add support for dynamically registering cmd line args
With this change, drivers or components can register on runtime
their own command line arguments.
What this change does is to use the dynamic command line arguments
API from BabbleSim's libUtil and provides a function for the
drivers to add their own.

Note that this change requires v1.3 of the HW models (which remove
a dependency on the board command line arguments structure)

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2019-01-07 10:27:09 -05:00

35 lines
630 B
C

/*
* Copyright (c) 2017 Oticon A/S
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef BSIM_NRF_ARGS_H
#define BSIM_NRF_ARGS_H
#include <stdint.h>
#include "NRF_hw_args.h"
#include "bs_cmd_line.h"
#include "bs_cmd_line_typical.h"
#ifdef __cplusplus
extern "C" {
#endif
#define MAXPARAMS_TESTCASES 1024
struct NRF_bsim_args_t {
BS_BASIC_DEVICE_OPTIONS_FIELDS
char *test_case_argv[MAXPARAMS_TESTCASES];
int test_case_argc;
nrf_hw_sub_args_t nrf_hw;
};
struct NRF_bsim_args_t *nrfbsim_argsparse(int argc, char *argv[]);
void bs_add_extra_dynargs(bs_args_struct_t *args_struct_toadd);
#ifdef __cplusplus
}
#endif
#endif