SLAA877 December 2018 MSP430FR2633
The example code includes three sensor handlers, one for each supported type of sensor. The handlers are placed in file media_player.c. The sensor handlers emulate the F7, F8, F9 CTRL-P, CTRL-B and CTRL-F keys on a keyboard that control the various Windows media player functions. These keys are mapped to specific gestures from each of the three sensors. When a valid gesture is detected, a lookup table provides the corresponding key value and is reported to the USB HID device. In a normal software design, the handler could incorporate the gesture algorithm within the same function, but in this demo, the handler and gesture functions are separate on purpose for code clarity.
The sensor gesture state diagrams in Section 2.3 provide an overview of the gesture functionality. Refer to the TIDM-02004 example demo source code for specific details regarding the implementation.