Functions | |
bool | b_joystick_get_value (xLogDef *pxLog) |
Get the current joystick state. More... | |
bool | b_joystick_init (void) |
Init the joystick sensor. More... | |
eExecStatus | e_joystick_get_config (signed portCHAR **ppcStringReply) |
Get the joystick sensor config. More... | |
eExecStatus | e_joystick_set_config (signed portCHAR **ppcStringReply, int ac, signed portCHAR *av[]) |
Set the sensor config. More... | |
void | v_joystick_stop (void) |
Stop the joystick sensor. More... | |
Get the current joystick state.
pxLog | a Log structure. |
References acpc_js_events, NULL, LogDef::pcStringLog, LogDef::pfFreeStringLog, and x_joystick.
Referenced by b_sensor_get_value().
bool b_joystick_init | ( | void | ) |
Init the joystick sensor.
References bAlarm, config_file_get_value(), Disable_global_interrupt, Enable_global_interrupt, gpio_enable_pin_interrupt(), GPIO_PIN_CHANGE, INTC_register_interrupt(), pdTRUE, SENSOR_JS_CONFIG_FILE, vjoystick_ISR(), x_supervisor_SemaphoreGive(), and x_supervisor_SemaphoreTake().
eExecStatus e_joystick_get_config | ( | signed portCHAR ** | ppcStringReply | ) |
Get the joystick sensor config.
ppcStringReply | Input/Output. The response string. NEVER NULL AS INPUT. A malloc for the response string is performed here; the caller must free this string. |
References bAlarm, SENSOR_MSG_ALARM_OFF, SENSOR_MSG_ALARM_ON, and SHELL_EXECSTATUS_OK_NO_FREE.
eExecStatus e_joystick_set_config | ( | signed portCHAR ** | ppcStringReply, |
int | ac, | ||
signed portCHAR * | av[] | ||
) |
Set the sensor config.
ppcStringReply | Input/Output. The response string. NEVER NULL AS INPUT. |
ac | Input. Number of args |
av | Input. pointer to args |
References bAlarm, config_file_set_value(), pdFALSE, pdTRUE, SENSOR_JS_CONFIG_FILE, SENSOR_MSG_ALARM_OFF, SENSOR_MSG_ALARM_ON, SHELL_ERRMSG_CONFIGERROR, SHELL_EXECSTATUS_KO, and SHELL_EXECSTATUS_OK_NO_FREE.
void v_joystick_stop | ( | void | ) |
Stop the joystick sensor.
References gpio_disable_pin_interrupt().