diff options
author | Joel Bodenmann <joel@unormal.org> | 2012-10-11 09:23:42 +0200 |
---|---|---|
committer | Joel Bodenmann <joel@unormal.org> | 2012-10-11 09:23:42 +0200 |
commit | 4a27e7c7994f7b21d951517e15131b7e67ff74c5 (patch) | |
tree | e71a31f955847dc45db88f6b16d71b869d2e9ed4 | |
parent | 3f6b604ff75447067d8d612f4a6063d870675272 (diff) | |
download | uGFX-4a27e7c7994f7b21d951517e15131b7e67ff74c5.tar.gz uGFX-4a27e7c7994f7b21d951517e15131b7e67ff74c5.tar.bz2 uGFX-4a27e7c7994f7b21d951517e15131b7e67ff74c5.zip |
TOUCHPADDriver -> TOUCHPADDriver_t
-rw-r--r-- | drivers/touchpad/ADS7843/touchpad_lld.c | 4 | ||||
-rw-r--r-- | drivers/touchpad/XPT2046/touchpad_lld.c | 4 | ||||
-rw-r--r-- | include/touchpad.h | 2 | ||||
-rw-r--r-- | include/touchpad_lld.h | 8 | ||||
-rw-r--r-- | src/touchpad.c | 2 |
5 files changed, 9 insertions, 11 deletions
diff --git a/drivers/touchpad/ADS7843/touchpad_lld.c b/drivers/touchpad/ADS7843/touchpad_lld.c index eeaf11b5..dbd74786 100644 --- a/drivers/touchpad/ADS7843/touchpad_lld.c +++ b/drivers/touchpad/ADS7843/touchpad_lld.c @@ -45,7 +45,7 @@ /*===========================================================================*/
#if !defined(__DOXYGEN__)
/* Local copy of the current touchpad driver */
- static const TOUCHPADDriver *tpDriver;
+ static const TOUCHPADDriver_t *tpDriver;
static uint16_t sampleBuf[7];
#endif
@@ -69,7 +69,7 @@ *
* @notapi
*/
-void tp_lld_init(const TOUCHPADDriver *tp) {
+void tp_lld_init(const TOUCHPADDriver_t *tp) {
tpDriver = tp;
if(tpDriver->direct_init)
diff --git a/drivers/touchpad/XPT2046/touchpad_lld.c b/drivers/touchpad/XPT2046/touchpad_lld.c index eeaf11b5..dbd74786 100644 --- a/drivers/touchpad/XPT2046/touchpad_lld.c +++ b/drivers/touchpad/XPT2046/touchpad_lld.c @@ -45,7 +45,7 @@ /*===========================================================================*/
#if !defined(__DOXYGEN__)
/* Local copy of the current touchpad driver */
- static const TOUCHPADDriver *tpDriver;
+ static const TOUCHPADDriver_t *tpDriver;
static uint16_t sampleBuf[7];
#endif
@@ -69,7 +69,7 @@ *
* @notapi
*/
-void tp_lld_init(const TOUCHPADDriver *tp) {
+void tp_lld_init(const TOUCHPADDriver_t *tp) {
tpDriver = tp;
if(tpDriver->direct_init)
diff --git a/include/touchpad.h b/include/touchpad.h index 18f72ec5..469144b1 100644 --- a/include/touchpad.h +++ b/include/touchpad.h @@ -70,7 +70,7 @@ typedef struct cal_t { extern "C" { #endif -void tpInit(const TOUCHPADDriver *tp); +void tpInit(const TOUCHPADDriver_t *tp); uint16_t tpReadX(void); uint16_t tpReadY(void); void tpCalibrate(void); diff --git a/include/touchpad_lld.h b/include/touchpad_lld.h index d300ddd2..77dd1578 100644 --- a/include/touchpad_lld.h +++ b/include/touchpad_lld.h @@ -73,12 +73,10 @@ /* Driver types. */ /*===========================================================================*/ -typedef struct _TOUCHPADDriver TOUCHPADDriver; - /** * @brief Structure representing a Touchpad driver. */ -struct _TOUCHPADDriver { +typedef struct _TOUCHPADDriver_t { /* * @brief Pointer to SPI driver. * @note SPI driver must be enabled in mcuconf.h and halconf.h @@ -115,7 +113,7 @@ struct _TOUCHPADDriver { * bus with a fast flash memory chip. */ bool_t direct_init; -}; +} TOUCHPADDriver_t; /*===========================================================================*/ @@ -128,7 +126,7 @@ extern "C" { #endif /* Core functions */ - void tp_lld_init(const TOUCHPADDriver *tp); + void tp_lld_init(const TOUCHPADDriver_t *tp); uint16_t tp_lld_read_value(uint8_t cmd); uint16_t tp_lld_read_x(void); diff --git a/src/touchpad.c b/src/touchpad.c index 0759134e..b38283c2 100644 --- a/src/touchpad.c +++ b/src/touchpad.c @@ -126,7 +126,7 @@ static void _tpDrawCross(uint16_t x, uint16_t y) { * * @api */ -void tpInit(const TOUCHPADDriver *tp) { +void tpInit(const TOUCHPADDriver_t *tp) { /* Initialise Mutex */ //MUTEX_INIT |