ugfx/touchpad.h
2012-06-03 17:52:02 +02:00

19 lines
338 B
C

#ifndef TOUCHPAD_H
#define TOUCHPAD_H
#include "ch.h"
#include "hal.h"
#define CONVERSIONS 3
#define SET_CS(a) (TP_PORT->BSRR = 1 << (TP_CS + (a ? 0 : 16)))
void tpInit(void);
void tpWriteData(uint8_t data);
void tpDrawCross(uint16_t x, uint16_t y);
uint16_t tpReadData(void);
uint16_t tpReadX(void);
uint16_t tpReadY(void);
#endif