Example of usage of the maXTouch component with USART.
This example shows how to receive touch data from a maXTouch device using the maXTouch component, and display them in a terminal window by using the USART driver.
Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
#include <asf.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "conf_board.h"
#include "conf_example.h"
#include "conf_uart_serial.h"
Macros | |
#define | MAX_ENTRIES 3 |
#define | STRING_LENGTH 40 |
#define | USART_TX_MAX_LENGTH 0xff |
Functions | |
int | main (void) |
void | mxt_handler (struct mxt_device *device) |
static void | mxt_init (struct mxt_device *device) |
Set maXTouch configuration. More... | |
#define MAX_ENTRIES 3 |
Referenced by mxt_handler().
#define STRING_LENGTH 40 |
Referenced by mxt_handler().
#define USART_TX_MAX_LENGTH 0xff |
int main | ( | void | ) |
void mxt_handler | ( | struct mxt_device * | device | ) |
|
static |
Set maXTouch configuration.
This function writes a set of predefined, optimal maXTouch configuration data to the maXTouch Xplained Pro.
device | Pointer to mxt_device struct |
References Assert, delay_ms, MAXTOUCH_TWI_ADDRESS, MAXTOUCH_TWI_INTERFACE, MAXTOUCH_XPRO_CHG_PIO, MXT_GEN_ACQUISITIONCONFIG_T8, MXT_GEN_COMMANDPROCESSOR_CALIBRATE, MXT_GEN_COMMANDPROCESSOR_RESET, MXT_GEN_COMMANDPROCESSOR_T6, MXT_GEN_POWERCONFIG_T7, mxt_get_object_address(), mxt_init_device(), MXT_PROCI_SHIELDLESS_T56, MXT_RESET_TIME, MXT_SPT_CTE_CONFIGURATION_T46, MXT_TOUCH_MULTITOUCHSCREEN_T9, MXT_TWI_SPEED, mxt_write_config_object(), mxt_write_config_reg(), twihs_options::speed, STATUS_OK, and twihs_master_setup().
Referenced by main().