swipeswitch 2.0.0.0
main.c File Reference

SwipeSwitch Click example. More...

#include "board.h"
#include "log.h"
#include "swipeswitch.h"

Macros

#define SWIPESWITCH_GESTURE_MODE   0
 
#define SWIPESWITCH_POSITION_MODE   1
 

Functions

void application_init (void)
 
void application_task (void)
 
int main (void)
 

Detailed Description

SwipeSwitch Click example.

Description

This Click is based on integrated touch controller featuring 2 receivers and 3 transmitters, allowing a 2x3 capacitive touch trackpad to be formed. By using a specific trace pattern on the PCB, the Click board is able to sense several different swipe gestures, offering several different configuration parameters.

The demo application is composed of two sections :

Application Init

Initialization and configuration of the chip for measurement

Application Task

In the first test mode, it checks whether or not a new event ocurred (TAP or SWIPE). If it did, it writes out data regarding that event via UART. In the second test mode, X and Y coordinates are being read and logged via UART.

Author
MikroE Team

Macro Definition Documentation

◆ SWIPESWITCH_GESTURE_MODE

#define SWIPESWITCH_GESTURE_MODE   0

◆ SWIPESWITCH_POSITION_MODE

#define SWIPESWITCH_POSITION_MODE   1

Function Documentation

◆ application_init()

void application_init ( void )

Logger initialization. Default baud rate: 115200 Default log level: LOG_LEVEL_DEBUG

Note
If USB_UART_RX and USB_UART_TX are defined as HAL_PIN_NC, you will need to define them manually for log to work. See LOG_MAP_USB_UART macro definition for detailed explanation.

◆ application_task()

void application_task ( void )

◆ main()

int main ( void )