Hi everyone,
I will to explain as clear as I can..
I have an enum inside a struct like this below in a seperate file than .c (the struct has many members, just for simplicity I added one now):
Code:
struct bmi160_int_settg
{
/*! Select Interrupt */
enum bmi160_int_types int_type;
};
Code:
enum bmi160_int_types {
/*! Slope/Any-motion interrupt */
BMI160_ACC_ANY_MOTION_INT,
/*! Significant motion interrupt */
BMI160_ACC_SIG_MOTION_INT,
/*! Step detector interrupt */
BMI160_STEP_DETECT_INT
};
Now, in the main.c I want to write a function which will take as parameter a member from the enun bmi160_int_types e.g BMI160_ACC_ANY_MOTION_INT. The function declaration will be in a seperate .h file
How should I decalre the function and how should I call it?
Thanks in advance
Nick