cleanups
This commit is contained in:
parent
1d6a1b5338
commit
1003c37e0b
10 changed files with 44 additions and 76 deletions
|
@ -131,7 +131,12 @@
|
||||||
}
|
}
|
||||||
static __inline void lld_lcdReadStreamStart(void) { /* TODO */ }
|
static __inline void lld_lcdReadStreamStart(void) { /* TODO */ }
|
||||||
static __inline void lld_lcdReadStreamStop(void) { /* TODO */ }
|
static __inline void lld_lcdReadStreamStop(void) { /* TODO */ }
|
||||||
static __inline void lld_lcdReadStream(uint16_t *UNUSED(buffer), size_t UNUSED(size)) { /* TODO */ }
|
static __inline void lld_lcdReadStream(uint16_t *buffer, size_t size) {
|
||||||
|
(void)buffer;
|
||||||
|
(void)size;
|
||||||
|
|
||||||
|
/* TODO */
|
||||||
|
}
|
||||||
|
|
||||||
#elif defined(LCD_USE_FSMC)
|
#elif defined(LCD_USE_FSMC)
|
||||||
#define LCD_REG (*((volatile uint16_t *) 0x60000000)) /* RS = 0 */
|
#define LCD_REG (*((volatile uint16_t *) 0x60000000)) /* RS = 0 */
|
||||||
|
|
|
@ -72,7 +72,10 @@ bool_t GDISP_LLD(init)(void) {
|
||||||
*
|
*
|
||||||
* @notapi
|
* @notapi
|
||||||
*/
|
*/
|
||||||
void GDISP_LLD(drawpixel)(coord_t UNUSED(x), coord_t UNUSED(y), color_t UNUSED(color)) {
|
void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
|
||||||
|
(void)x;
|
||||||
|
(void)y;
|
||||||
|
(void)color;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---- Optional Routines ---- */
|
/* ---- Optional Routines ---- */
|
||||||
|
@ -87,7 +90,10 @@ void GDISP_LLD(drawpixel)(coord_t UNUSED(x), coord_t UNUSED(y), color_t UNUSED(c
|
||||||
*
|
*
|
||||||
* @notapi
|
* @notapi
|
||||||
*/
|
*/
|
||||||
color_t GDISP_LLD(getpixelcolor)(coord_t UNUSED(x), coord_t UNUSED(y)) {
|
color_t GDISP_LLD(getpixelcolor)(coord_t x, coord_t y) {
|
||||||
|
(void)x;
|
||||||
|
(void)y;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -106,7 +112,13 @@ void GDISP_LLD(drawpixel)(coord_t UNUSED(x), coord_t UNUSED(y), color_t UNUSED(c
|
||||||
*
|
*
|
||||||
* @notapi
|
* @notapi
|
||||||
*/
|
*/
|
||||||
void GDISP_LLD(verticalscroll)(coord_t UNUSED(x), coord_t UNUSED(y), coord_t UNUSED(cx), coord_t UNUSED(cy), int UNUSED(lines), color_t UNUSED(bgcolor)) {
|
void GDISP_LLD(verticalscroll)(coord_t x, coord_t y, coord_t cx, coord_t cy, int lines, color_t bgcolor) {
|
||||||
|
(void)x;
|
||||||
|
(void)y;
|
||||||
|
(void)cx;
|
||||||
|
(void)cy;
|
||||||
|
(void)lines;
|
||||||
|
(void)bgcolor;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -36,15 +36,6 @@
|
||||||
/* Driver local definitions. */
|
/* Driver local definitions. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
#ifdef UNUSED
|
|
||||||
#elif defined(__GNUC__)
|
|
||||||
# define UNUSED(x) UNUSED_ ## x __attribute__((unused))
|
|
||||||
#elif defined(__LCLINT__)
|
|
||||||
# define UNUSED(x) /*@unused@*/ x
|
|
||||||
#else
|
|
||||||
# define UNUSED(x) x
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Driver exported variables. */
|
/* Driver exported variables. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
|
@ -36,15 +36,6 @@
|
||||||
/* Driver local definitions. */
|
/* Driver local definitions. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
#ifdef UNUSED
|
|
||||||
#elif defined(__GNUC__)
|
|
||||||
# define UNUSED(x) UNUSED_ ## x __attribute__((unused))
|
|
||||||
#elif defined(__LCLINT__)
|
|
||||||
# define UNUSED(x) /*@unused@*/ x
|
|
||||||
#else
|
|
||||||
# define UNUSED(x) x
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Driver exported variables. */
|
/* Driver exported variables. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
|
@ -33,15 +33,6 @@
|
||||||
|
|
||||||
#if HAL_USE_GDISP || defined(__DOXYGEN__)
|
#if HAL_USE_GDISP || defined(__DOXYGEN__)
|
||||||
|
|
||||||
#ifdef UNUSED
|
|
||||||
#elif defined(__GNUC__)
|
|
||||||
# define UNUSED(x) UNUSED_ ## x __attribute__((unused))
|
|
||||||
#elif defined(__LCLINT__)
|
|
||||||
# define UNUSED(x) /*@unused@*/ x
|
|
||||||
#else
|
|
||||||
# define UNUSED(x) x
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef GDISP_LLD_NO_STRUCT
|
#ifndef GDISP_LLD_NO_STRUCT
|
||||||
static struct GDISPDriver {
|
static struct GDISPDriver {
|
||||||
coord_t Width;
|
coord_t Width;
|
||||||
|
@ -587,7 +578,9 @@
|
||||||
|
|
||||||
|
|
||||||
#if GDISP_NEED_CONTROL && !GDISP_HARDWARE_CONTROL
|
#if GDISP_NEED_CONTROL && !GDISP_HARDWARE_CONTROL
|
||||||
void GDISP_LLD(control)(unsigned UNUSED(what), void *UNUSED(value)) {
|
void GDISP_LLD(control)(unsigned what, void *value) {
|
||||||
|
(void)what;
|
||||||
|
(void)value;
|
||||||
/* Ignore everything */
|
/* Ignore everything */
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
ChibiOS/GFX/RT - Copyright (C) 2012
|
ChibiOS/GFX - Copyright (C) 2012
|
||||||
Joel Bodenmann aka Tectu <joel@unormal.org>
|
Joel Bodenmann aka Tectu <joel@unormal.org>
|
||||||
|
|
||||||
This file is part of ChibiOS/GFX.
|
This file is part of ChibiOS/GFX.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
ChibiOS/GFX/RT - Copyright (C) 2012
|
ChibiOS/GFX - Copyright (C) 2012
|
||||||
Joel Bodenmann aka Tectu <joel@unormal.org>
|
Joel Bodenmann aka Tectu <joel@unormal.org>
|
||||||
|
|
||||||
This file is part of ChibiOS/GFX.
|
This file is part of ChibiOS/GFX.
|
||||||
|
|
12
src/gdisp.c
12
src/gdisp.c
|
@ -43,15 +43,6 @@
|
||||||
/* Driver local definitions. */
|
/* Driver local definitions. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
#ifdef UNUSED
|
|
||||||
#elif defined(__GNUC__)
|
|
||||||
# define UNUSED(x) UNUSED_ ## x __attribute__((unused))
|
|
||||||
#elif defined(__LCLINT__)
|
|
||||||
# define UNUSED(x) /*@unused@*/ x
|
|
||||||
#else
|
|
||||||
# define UNUSED(x) x
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if GDISP_NEED_MULTITHREAD
|
#if GDISP_NEED_MULTITHREAD
|
||||||
#if !CH_USE_MUTEXES
|
#if !CH_USE_MUTEXES
|
||||||
#error "GDISP: CH_USE_MUTEXES must be defined in chconf.h because GDISP_NEED_MULTITHREAD is defined"
|
#error "GDISP: CH_USE_MUTEXES must be defined in chconf.h because GDISP_NEED_MULTITHREAD is defined"
|
||||||
|
@ -94,7 +85,8 @@
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
#if GDISP_NEED_ASYNC
|
#if GDISP_NEED_ASYNC
|
||||||
static msg_t GDISPThreadHandler(void *UNUSED(arg)) {
|
static msg_t GDISPThreadHandler(void *arg) {
|
||||||
|
(void)arg;
|
||||||
gdisp_lld_msg_t *pmsg;
|
gdisp_lld_msg_t *pmsg;
|
||||||
|
|
||||||
#if CH_USE_REGISTRY
|
#if CH_USE_REGISTRY
|
||||||
|
|
|
@ -36,15 +36,6 @@
|
||||||
/* Driver local definitions. */
|
/* Driver local definitions. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
#ifdef UNUSED
|
|
||||||
#elif defined(__GNUC__)
|
|
||||||
# define UNUSED(x) UNUSED_ ## x __attribute__((unused))
|
|
||||||
#elif defined(__LCLINT__)
|
|
||||||
# define UNUSED(x) /*@unused@*/ x
|
|
||||||
#else
|
|
||||||
# define UNUSED(x) x
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Driver exported variables. */
|
/* Driver exported variables. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
@ -172,6 +163,7 @@ uint16_t tpReadX(void) {
|
||||||
case landscapeInv:
|
case landscapeInv:
|
||||||
return y;
|
return y;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -198,6 +190,7 @@ uint16_t tpReadY(void) {
|
||||||
case landscapeInv:
|
case landscapeInv:
|
||||||
return SCREEN_WIDTH - x;
|
return SCREEN_WIDTH - x;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -232,7 +225,6 @@ void tpCalibrate(void) {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if TOUCHPAD_HAS_IRQ || defined(__DOXYGEN__)
|
|
||||||
/**
|
/**
|
||||||
* @brief returns if touchpad is pressed or not
|
* @brief returns if touchpad is pressed or not
|
||||||
*
|
*
|
||||||
|
@ -240,12 +232,12 @@ void tpCalibrate(void) {
|
||||||
*
|
*
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
|
#if TOUCHPAD_HAS_IRQ || defined(__DOXYGEN__)
|
||||||
uint8_t tpIRQ(void) {
|
uint8_t tpIRQ(void) {
|
||||||
return tp_lld_irq();
|
return tp_lld_irq();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if TOUCHPAD_HAS_PRESSURE || defined(__DOXYGEN__)
|
|
||||||
/**
|
/**
|
||||||
* @brief Get the pressure.
|
* @brief Get the pressure.
|
||||||
*
|
*
|
||||||
|
@ -253,6 +245,7 @@ void tpCalibrate(void) {
|
||||||
*
|
*
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
|
#if TOUCHPAD_HAS_PRESSURE || defined(__DOXYGEN__)
|
||||||
uint16_t tpReadZ(void) {
|
uint16_t tpReadZ(void) {
|
||||||
/* ToDo */
|
/* ToDo */
|
||||||
return (tp_lld_read_z());
|
return (tp_lld_read_z());
|
||||||
|
|
|
@ -42,15 +42,6 @@
|
||||||
#define TP_CS_HIGH palSetPad(TP_CS_PORT, TP_CS)
|
#define TP_CS_HIGH palSetPad(TP_CS_PORT, TP_CS)
|
||||||
#define TP_CS_LOW palClearPad(TP_CS_PORT, TP_CS)
|
#define TP_CS_LOW palClearPad(TP_CS_PORT, TP_CS)
|
||||||
|
|
||||||
#ifdef UNUSED
|
|
||||||
#elif defined(__GNUC__)
|
|
||||||
# define UNUSED(x) UNUSED_ ## x __attribute__((unused))
|
|
||||||
#elif defined(__LCLINT__)
|
|
||||||
# define UNUSED(x) /*@unused@*/ x
|
|
||||||
#else
|
|
||||||
# define UNUSED(x) x
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Driver exported variables. */
|
/* Driver exported variables. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
Loading…
Add table
Reference in a new issue