TOUCHPADDriver -> TOUCHPADDriver_t

ugfx_release_2.6
Joel Bodenmann 2012-10-11 09:23:42 +02:00
parent 3f6b604ff7
commit 4a27e7c799
5 changed files with 9 additions and 11 deletions

View File

@ -45,7 +45,7 @@
/*===========================================================================*/ /*===========================================================================*/
#if !defined(__DOXYGEN__) #if !defined(__DOXYGEN__)
/* Local copy of the current touchpad driver */ /* Local copy of the current touchpad driver */
static const TOUCHPADDriver *tpDriver; static const TOUCHPADDriver_t *tpDriver;
static uint16_t sampleBuf[7]; static uint16_t sampleBuf[7];
#endif #endif
@ -69,7 +69,7 @@
* *
* @notapi * @notapi
*/ */
void tp_lld_init(const TOUCHPADDriver *tp) { void tp_lld_init(const TOUCHPADDriver_t *tp) {
tpDriver = tp; tpDriver = tp;
if(tpDriver->direct_init) if(tpDriver->direct_init)

View File

@ -45,7 +45,7 @@
/*===========================================================================*/ /*===========================================================================*/
#if !defined(__DOXYGEN__) #if !defined(__DOXYGEN__)
/* Local copy of the current touchpad driver */ /* Local copy of the current touchpad driver */
static const TOUCHPADDriver *tpDriver; static const TOUCHPADDriver_t *tpDriver;
static uint16_t sampleBuf[7]; static uint16_t sampleBuf[7];
#endif #endif
@ -69,7 +69,7 @@
* *
* @notapi * @notapi
*/ */
void tp_lld_init(const TOUCHPADDriver *tp) { void tp_lld_init(const TOUCHPADDriver_t *tp) {
tpDriver = tp; tpDriver = tp;
if(tpDriver->direct_init) if(tpDriver->direct_init)

View File

@ -70,7 +70,7 @@ typedef struct cal_t {
extern "C" { extern "C" {
#endif #endif
void tpInit(const TOUCHPADDriver *tp); void tpInit(const TOUCHPADDriver_t *tp);
uint16_t tpReadX(void); uint16_t tpReadX(void);
uint16_t tpReadY(void); uint16_t tpReadY(void);
void tpCalibrate(void); void tpCalibrate(void);

View File

@ -73,12 +73,10 @@
/* Driver types. */ /* Driver types. */
/*===========================================================================*/ /*===========================================================================*/
typedef struct _TOUCHPADDriver TOUCHPADDriver;
/** /**
* @brief Structure representing a Touchpad driver. * @brief Structure representing a Touchpad driver.
*/ */
struct _TOUCHPADDriver { typedef struct _TOUCHPADDriver_t {
/* /*
* @brief Pointer to SPI driver. * @brief Pointer to SPI driver.
* @note SPI driver must be enabled in mcuconf.h and halconf.h * @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. * bus with a fast flash memory chip.
*/ */
bool_t direct_init; bool_t direct_init;
}; } TOUCHPADDriver_t;
/*===========================================================================*/ /*===========================================================================*/
@ -128,7 +126,7 @@ extern "C" {
#endif #endif
/* Core functions */ /* 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_value(uint8_t cmd);
uint16_t tp_lld_read_x(void); uint16_t tp_lld_read_x(void);

View File

@ -126,7 +126,7 @@ static void _tpDrawCross(uint16_t x, uint16_t y) {
* *
* @api * @api
*/ */
void tpInit(const TOUCHPADDriver *tp) { void tpInit(const TOUCHPADDriver_t *tp) {
/* Initialise Mutex */ /* Initialise Mutex */
//MUTEX_INIT //MUTEX_INIT