-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathNRF_hw_args.h
66 lines (58 loc) · 2.31 KB
/
NRF_hw_args.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*
* Copyright (c) 2017 Oticon A/S
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef NRF_HW_ARGS_H
#define NRF_HW_ARGS_H
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
double xo_drift;
double start_offset;
bool useRealAES;
} nrf_hw_sub_args_t;
void nrf_hw_sub_cmline_set_defaults(nrf_hw_sub_args_t *ptr);
int nrf_hw_sub_cmdline_parse(char *argv_i, nrf_hw_sub_args_t *args);
void nrf_hw_sub_command_line_handle(nrf_hw_sub_args_t *args, double start_time);
extern double nrfhw_start_of;
void nrf_hw_cmd_starto_found(char * argv, int offset);
extern double nrfhw_drift;
void nrf_hw_cmd_drift_found(char * argv, int offset);
extern bool nrfhw_useRealAES;
void nrf_hw_cmd_useRealAES_found(char * argv, int offset);
extern char *gpio_in_file_path;
extern char *gpio_out_file_path;
extern char *gpio_conf_file_path;
#define _NRF_HW_SUB_CMD_ARG_STRUCT \
/*manual,mandatory,switch, option, name , type, destination, callback, , description*/ \
{ false , false , false, "start_offset" , "start_of", 'f', (void*)&nrfhw_start_of, nrf_hw_cmd_starto_found,"Offset in time (at the start of the simulation) of this device. At time 0 of the device, the phy will be at <start_of>"}, \
{ false , false , false, "xo_drift" , "xo_drift", 'f', (void*)&nrfhw_drift, nrf_hw_cmd_drift_found, "Simple linear model of the XO drift of this device. For ex. for -30ppm set to -30e-6"}, \
{ false , false , false, "RealEncryption", "realAES", 'b', (void*)&nrfhw_useRealAES, nrf_hw_cmd_useRealAES_found, "(0)/1 Use the real AES encryption for the LL or just send everything in plain text (default) (requires the ext_libCryptov1 component)"}, \
{ \
.option="gpio_in_file",\
.name="path",\
.type='s',\
.dest=(void *)&gpio_in_file_path,\
.descript="Optional path to a file containing GPIOs inputs activity",\
},\
{ \
.option="gpio_out_file",\
.name="path",\
.type='s',\
.dest=(void *)&gpio_out_file_path,\
.descript="Optional path to a file where GPIOs output activity will be saved",\
},\
{ \
.option="gpio_conf_file",\
.name="path",\
.type='s',\
.dest=(void *)&gpio_conf_file_path,\
.descript="Optional path to a file where the GPIOs configuration will be found.",\
}\
#ifdef __cplusplus
}
#endif
#endif