Microchip® Advanced Software Framework

ads7843_example.c File Reference

ads7843 touchscreen controller Example.

Copyright (c) 2011-2018 Microchip Technology Inc. and its subsidiaries.

#include "asf.h"
#include "stdio_serial.h"
#include "conf_board.h"
#include "resistive_touch_board.h"
#include "rtouch_calibrate.h"

Macros

#define IRQ_PRIOR_PIO   0
 IRQ priority for PIO (The lower the value, the greater the priority) More...
 
#define STRING_EOL   "\r"
 
#define STRING_HEADER
 

Functions

static void configure_console (void)
 Configure the Console UART. More...
 
static void event_handler (rtouch_event_t const *event)
 Callback called when the pen is pressed on the touchscreen. More...
 
int main (void)
 Application entry point for spi_touchscreen example. More...
 
void SysTick_Handler (void)
 Handler for SysTick interrupt. More...
 

Variables

static volatile uint32_t g_ul_tick_count = 0
 Tick Counter united by ms. More...
 

#define IRQ_PRIOR_PIO   0

IRQ priority for PIO (The lower the value, the greater the priority)

Referenced by main().

#define STRING_EOL   "\r"
#define STRING_HEADER
Value:
"-- SPI_Touchscreen Example --\r\n" \
"-- "BOARD_NAME" --\r\n" \
"-- Compiled: "__DATE__" "__TIME__" --"STRING_EOL
#define BOARD_NAME
Definition: inc/app_init.h:140
#define STRING_EOL
Definition: ads7843_example.c:90

Referenced by main().

static void configure_console ( void  )
static
static void event_handler ( rtouch_event_t const *  event)
static

Callback called when the pen is pressed on the touchscreen.

Parameters
xhorizontal position (in pixel if ts calibrated).
yvertical position (in pixel if ts calibrated).

References rtouch_event_struct::panel, RTOUCH_MOVE, RTOUCH_PRESS, RTOUCH_RELEASE, rtouch_event_struct::type, rtouch_point_struct::x, and rtouch_point_struct::y.

Referenced by main().

void SysTick_Handler ( void  )

Handler for SysTick interrupt.

Increments the timestamp counter.

References g_ul_tick_count, and rtouch_process().

volatile uint32_t g_ul_tick_count = 0
static

Tick Counter united by ms.