touchkey4 2.0.0.0
main.c File Reference

TouchKey4 Click example. More...

#include "board.h"
#include "log.h"
#include "touchkey4.h"

Functions

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

Detailed Description

TouchKey4 Click example.

Description

This demo performs touch & release detection click functionality.

The demo application is composed of two sections :

Application Init

Device and driver initialization.

Application Task

Calls function to check touch detection (is interrupt occured) and shows message on USB UART if touch is detected or if touch is released on enabled inputs.

note:

TouchKey 4 is configured to work in Combo mode (Active and Standby mode). Input 1 is
enabled in Active mode, input 3 is enabled in Standby mode, and input 2 is enabled to
work in both modes. In this example the interrupt will be generated when touch is
detected and when touch is released. 
Standby mode should be used when fewer sensor inputs are enabled, and when
they are programmed to have more sensitivity.
Sometimes it is neccessary to cycle the board power supply if click doesn't work. 
Author
MikroE Team

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 )