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 |
Referenced by main().
|
static |
Configure the Console UART.
References uart_rs232_options::baudrate, stdio_serial_init(), and sysclk_enable_peripheral_clock().
Referenced by main().
|
static |
Callback called when the pen is pressed on the touchscreen.
x | horizontal position (in pixel if ts calibrated). |
y | vertical 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().
int main | ( | void | ) |
Application entry point for spi_touchscreen example.
References aat31xx_disable_backlight(), AAT31XX_MAX_BACKLIGHT_LEVEL, aat31xx_set_backlight(), board_init(), configure_console(), event_handler(), IRQ_PRIOR_PIO, pmc_enable_periph_clk(), rtouch_calibrate(), rtouch_enable(), rtouch_init(), rtouch_set_event_handler(), STRING_HEADER, sysclk_get_cpu_hz(), and sysclk_init().
void SysTick_Handler | ( | void | ) |
Handler for SysTick interrupt.
Increments the timestamp counter.
References g_ul_tick_count, and rtouch_process().
|
static |
Tick Counter united by ms.