39 #include <px4_platform_common/defines.h> 45 #define PARAM_MAGIC1 12345678 46 #define PARAM_MAGIC2 0xa5a5a5a5 56 warnx(
"test parameter not found");
61 warnx(
"failed param reset");
68 warnx(
"test parameter type mismatch (got %u)", (
unsigned)t);
75 warnx(
"failed to read test parameter");
80 warnx(
"parameter value mismatch");
87 warnx(
"failed to write test parameter");
92 warnx(
"failed to re-read test parameter");
97 warnx(
"parameter value mismatch after write");
101 warnx(
"parameter test PASS");
#define PARAM_INVALID
Handle returned when a parameter cannot be found.
#define PARAM_TYPE_INT32
Parameter types.
__EXPORT int param_get(param_t param, void *val)
Copy the value of a parameter.
__EXPORT int param_set(param_t param, const void *val)
Set the value of a parameter.
Global flash based parameter store.
int test_param(int argc, char *argv[])
__EXPORT param_type_t param_type(param_t param)
Obtain the type of a parameter.
Simple error/warning functions, heavily inspired by the BSD functions of the same names...
__EXPORT param_t param_find(const char *name)
Look up a parameter by name.
__EXPORT int param_reset(param_t param)
Reset a parameter to its default value.
uint32_t param_t
Parameter handle.