Functions | |
int | action_handler_on_state_change (int prev_state, int current_state) |
An action handler on state change (Glue code). | |
int | getCurrentState (void) |
Return the current GPCA state (Glue code). | |
int | activate_gpca_channel (unsigned char cmd) |
Activate a channel based on the environmental stimulus. | |
Variables | |
int | current_GPCA_state = GPCA_Instance_POST_Init |
A global variable to keep track of the current GPCA state (Glue code). | |
int | prev_GPCA_state = GPCA_Instance_POST_Init |
int action_handler_on_state_change | ( | int | prev_state, | |
int | current_state | |||
) |
An action handler on state change (Glue code).
An action handler when state change is reported by check_trans fucntion, it is required to do proper action depending on the state that goes into. prev_state a previous gpca state. current_state a current gpca state. The result of processing the corresponding action handler, -1 in case of action handler fails to do a proper action.
Definition at line 1449 of file main.c.
int activate_gpca_channel | ( | unsigned char | cmd | ) |
Activate a channel based on the environmental stimulus.
Activate an gpca channel that interacts with environment. cmd Channel Indicator received from Environment. The channel id that has been activated, -1 in case of invalid channel.
Definition at line 1233 of file main.c.
int getCurrentState | ( | void | ) |
int current_GPCA_state = GPCA_Instance_POST_Init |
int prev_GPCA_state = GPCA_Instance_POST_Init |