touchkey3 2.0.0.0
main.c File Reference

TouchKey3 Click example. More...

#include "board.h"
#include "log.h"
#include "touchkey3.h"

Functions

uint8_t calculationt_index (uint8_t data_in)
 
void application_init (void)
 
void application_task (void)
 
int main (void)
 

Detailed Description

TouchKey3 Click example.

Description

This click uses 7 capacitive sensing channels, with the #CHANGE pin routed to the INT pin of the mikroBUS™, so that an interrupt can be triggered if any of the sensors detect a touch event. This can be used to trigger an SPI read cycle only when the key is actually pressed, avoiding the need for constant polling of the sensor registers.

The demo application is composed of two sections :

Application Init

Initializes click driver and performs a soft reset of the click.

Application Task

Reads the status of the keys, and outputs a message if a key is touched.

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 )

◆ calculationt_index()

uint8_t calculationt_index ( uint8_t data_in)

◆ main()

int main ( void )