Atmel Software Framework

applications/evk1100-control-panel/sensors/joystick.h File Reference
#include "compiler.h"
#include "FreeRTOS.h"
#include "shell.h"
#include "datalog.h"

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...
 

bool b_joystick_get_value ( xLogDef pxLog)

Get the current joystick state.

Parameters
pxLoga Log structure.
Returns
true upon success, false if error.

References acpc_js_events, NULL, LogDef::pcStringLog, LogDef::pfFreeStringLog, and x_joystick.

Referenced by b_sensor_get_value().

eExecStatus e_joystick_get_config ( signed portCHAR **  ppcStringReply)

Get the joystick sensor config.

Parameters
ppcStringReplyInput/Output. The response string. NEVER NULL AS INPUT. A malloc for the response string is performed here; the caller must free this string.
Returns
the status of the command execution.

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.

Parameters
ppcStringReplyInput/Output. The response string. NEVER NULL AS INPUT.
acInput. Number of args
avInput. pointer to args
Returns
the status of the command execution.

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().