Author | Matthew Schinkel - borntechi.com, copyright © 2009, all rights reserved. |
Adapted-by | |
Compiler | >=2.4k |
Library for GLCD touch controller & A/D device ad7843. used with GLCD's such as stm032qvt-003
http://www.divshare.com/download/11463401-4a9
No dependency found
var bit*3 touch_register at _touch_settings : 4
const bit*3 TOUCH_REG_IN3 = 0b010
const TOUCH_12_BIT = 0
const bit*3 TOUCH_REG_IN4 = 0b110
const TOUCH_INTERRUPT_ENABLE = 0
var bit touch_ser_dfr at _touch_settings : 2
const TOUCH_INTERRUPT_DISABLED = 1
var bit touch_pd0 at _touch_settings : 0
const bit*3 TOUCH_REG_Y = 0b001
var byte _touch_settings
const TOUCH_8_BIT = 1
const TOUCH_AD_SINGLE_ENDED = 1
var bit touch_mode at _touch_settings : 3
var bit touch_pd1 at _touch_settings : 1
const TOUCH_LOW_POWER = 0
const TOUCH_AD_DIFFERENTIAL = 0
var bit touch_start_bit at _touch_settings : 7
const bit*3 TOUCH_REG_X = 0b101
const TOUCH_HIGH_POWER = 1
var bit*3 touch_register at _touch_settings : 4
register select bits
const bit*3 TOUCH_REG_IN3 = 0b010
read analog input IN3
const TOUCH_12_BIT = 0
modes
const bit*3 TOUCH_REG_IN4 = 0b110
read analog input IN4
const TOUCH_INTERRUPT_ENABLE = 0
interrupt setting constants
var bit touch_ser_dfr at _touch_settings : 2
A/D reference mode
const TOUCH_INTERRUPT_DISABLED = 1
No documentation found
var bit touch_pd0 at _touch_settings : 0
interrupt enable bit
const bit*3 TOUCH_REG_Y = 0b001
read y
var byte _touch_settings
command byte
const TOUCH_8_BIT = 1
No documentation found
const TOUCH_AD_SINGLE_ENDED = 1
No documentation found
var bit touch_mode at _touch_settings : 3
resolution mode. 0 = 12bit, 1 = 8bit
var bit touch_pd1 at _touch_settings : 1
power management bit
const TOUCH_LOW_POWER = 0
power setting constants
const TOUCH_AD_DIFFERENTIAL = 0
A/D reference modes
var bit touch_start_bit at _touch_settings : 7
register write start bit
const bit*3 TOUCH_REG_X = 0b101
registers
const TOUCH_HIGH_POWER = 1
No documentation found
touch_init()
Initiate touch controller
touch_read_xy_8_bit(byte in out x, byte in out y)
Read x,y coordinates of touch screen with 8 bit resolution. Should be polled. If x near equal to 0, and y near equal to 127, then there is no activity.
18f4620 | 18f4620_glcd_touch_stm032qvt_003.jal |
18f46k22 | 18f46k22_glcd_touch_stm032qvt_003.jal |