diff options
Diffstat (limited to 'drivers/ginput')
11 files changed, 208 insertions, 288 deletions
diff --git a/drivers/ginput/touch/ADS7843/ginput_lld_mouse.c b/drivers/ginput/touch/ADS7843/ginput_lld_mouse.c index a25e6bac..f9ebe56d 100644 --- a/drivers/ginput/touch/ADS7843/ginput_lld_mouse.c +++ b/drivers/ginput/touch/ADS7843/ginput_lld_mouse.c @@ -20,17 +20,7 @@ #include "ginput/lld/mouse.h"
-#if defined(GINPUT_MOUSE_USE_CUSTOM_BOARD) && GINPUT_MOUSE_USE_CUSTOM_BOARD
- #include "ginput_lld_mouse_board.h"
-#elif defined(BOARD_FIREBULL_STM32_F103)
- #include "ginput_lld_mouse_board_firebull_stm32f103.h"
-#elif defined(BOARD_OLIMEX_STM32_E407)
- #include "ginput_lld_mouse_board_olimex_stm32_e407.h"
-#elif defined(BOARD_ST_STM32F4_DISCOVERY)
- #include "ginput_lld_mouse_board_st_stm32f4_discovery.h"
-#else
- #include "ginput_lld_mouse_board_example.h"
-#endif
+#include "ginput_lld_mouse_board.h"
#if defined(GINPUT_MOUSE_YX_INVERTED) && GINPUT_MOUSE_YX_INVERTED
#define CMD_X 0x91
diff --git a/drivers/ginput/touch/ADS7843/ginput_lld_mouse_board_example.h b/drivers/ginput/touch/ADS7843/ginput_lld_mouse_board_template.h index 61f2ee50..8808d24d 100644 --- a/drivers/ginput/touch/ADS7843/ginput_lld_mouse_board_example.h +++ b/drivers/ginput/touch/ADS7843/ginput_lld_mouse_board_template.h @@ -4,72 +4,68 @@ * * http://chibios-gfx.com/license.html */ -
-/**
- * @file drivers/ginput/touch/ADS7843/ginput_lld_mouse_board_example.h
- * @brief GINPUT Touch low level driver source for the ADS7843 on the example board.
- *
- * @defgroup Mouse Mouse
- * @ingroup GINPUT
- * @{
- */
-
-#ifndef _GINPUT_LLD_MOUSE_BOARD_H
-#define _GINPUT_LLD_MOUSE_BOARD_H
-
-/**
- * @brief Initialise the board for the touch.
- *
- * @notapi
- */
-static inline void init_board(void) {
- /* Code here */
- #error "ginputADS7843: You must supply a definition for init_board for your board"
-}
-
-/**
- * @brief Check whether the surface is currently touched
- * @return TRUE if the surface is currently touched
- *
- * @notapi
- */
-static inline bool_t getpin_pressed(void) {
- /* Code here */
- #error "ginputADS7843: You must supply a definition for getpin_pressed for your board"
-}
-
-/**
- * @brief Aquire the bus ready for readings
- *
- * @notapi
- */
-static inline void aquire_bus(void) {
- /* Code here */
- #error "ginputADS7843: You must supply a definition for aquire_bus for your board"
-}
-
-/**
- * @brief Release the bus after readings
- *
- * @notapi
- */
-static inline void release_bus(void) {
- /* Code here */
- #error "ginputADS7843: You must supply a definition for release_bus for your board"
-}
-
-/**
- * @brief Read a value from touch controller
- * @return The value read from the controller
- *
- * params[in] port The controller port to read.
- *
- * @notapi
- */
-static inline uint16_t read_value(uint16_t port) {
- /* Code here */
- #error "ginputADS7843: You must supply a definition for read_value for your board"
-}
-
-#endif /* _GINPUT_LLD_MOUSE_BOARD_H */
-/** @} */
+ +/** + * @file drivers/ginput/touch/ADS7843/ginput_lld_mouse_board_template.h + * @brief GINPUT Touch low level driver source for the ADS7843 on the example board. + * + * @defgroup Mouse Mouse + * @ingroup GINPUT + * @{ + */ + +#ifndef _GINPUT_LLD_MOUSE_BOARD_H +#define _GINPUT_LLD_MOUSE_BOARD_H + +/** + * @brief Initialise the board for the touch. + * + * @notapi + */ +static inline void init_board(void) { + +} + +/** + * @brief Check whether the surface is currently touched + * @return TRUE if the surface is currently touched + * + * @notapi + */ +static inline bool_t getpin_pressed(void) { + +} + +/** + * @brief Aquire the bus ready for readings + * + * @notapi + */ +static inline void aquire_bus(void) { + +} + +/** + * @brief Release the bus after readings + * + * @notapi + */ +static inline void release_bus(void) { + +} + +/** + * @brief Read a value from touch controller + * @return The value read from the controller + * + * params[in] port The controller port to read. + * + * @notapi + */ +static inline uint16_t read_value(uint16_t port) { + +} + +#endif /* _GINPUT_LLD_MOUSE_BOARD_H */ +/** @} */ + diff --git a/drivers/ginput/touch/ADS7843/readme.txt b/drivers/ginput/touch/ADS7843/readme.txt deleted file mode 100644 index abc4b0e9..00000000 --- a/drivers/ginput/touch/ADS7843/readme.txt +++ /dev/null @@ -1,8 +0,0 @@ -To use this driver:
-
-1. Add in your gfxconf.h:
- a) #define GFX_USE_GINPUT TRUE
- b) #define GINPUT_NEED_MOUSE TRUE
-
-2. To your makefile add the following lines:
- include $(GFXLIB)/drivers/ginput/touch/ADS7843/ginput_lld.mk
diff --git a/drivers/ginput/touch/FT5x06/ginput_lld_mouse_board.h b/drivers/ginput/touch/FT5x06/ginput_lld_mouse_board_marlin.h index 06b408dd..06b408dd 100644 --- a/drivers/ginput/touch/FT5x06/ginput_lld_mouse_board.h +++ b/drivers/ginput/touch/FT5x06/ginput_lld_mouse_board_marlin.h diff --git a/drivers/ginput/touch/FT5x06/ginput_lld_mouse_board_example.h b/drivers/ginput/touch/FT5x06/ginput_lld_mouse_board_template.h index 19e824e5..3ae7f85c 100644 --- a/drivers/ginput/touch/FT5x06/ginput_lld_mouse_board_example.h +++ b/drivers/ginput/touch/FT5x06/ginput_lld_mouse_board_template.h @@ -6,7 +6,7 @@ */ /** - * @file drivers/ginput/touch/FT5x06/ginput_lld_mouse_board_example.h + * @file drivers/ginput/touch/FT5x06/ginput_lld_mouse_board_template.h * @brief GINPUT Touch low level driver source for the FT5x06 on the example board. * * @defgroup Mouse Mouse @@ -23,8 +23,7 @@ * @notapi */ static void init_board(void) { - /* Code here */ - #error "ginputFT5x06: You must supply a definition for init_board for your board" + } /** @@ -34,8 +33,7 @@ static void init_board(void) { * @notapi */ static inline bool_t getpin_irq(void) { - /* Code here */ - #error "ginputFT5x06: You must supply a definition for getpin_irq for your board" + } /** @@ -48,8 +46,7 @@ static inline bool_t getpin_irq(void) { * @notapi */ static void write_reg(uint8_t reg, uint8_t n, uint16_t val) { - /* Code here */ - #error "ginputFT5x06: You must supply a definition for write_reg for your board" + } /** @@ -63,8 +60,7 @@ static void write_reg(uint8_t reg, uint8_t n, uint16_t val) { * @notapi */ static uint16_t read_reg(uint8_t reg, uint8_t n) { - /* Code here */ - #error "ginputFT5x06: You must supply a definition for read_reg for your board" + } #endif /* _GINPUT_LLD_MOUSE_BOARD_H */ diff --git a/drivers/ginput/touch/FT5x06/readme.txt b/drivers/ginput/touch/FT5x06/readme.txt deleted file mode 100644 index ec3ae757..00000000 --- a/drivers/ginput/touch/FT5x06/readme.txt +++ /dev/null @@ -1,8 +0,0 @@ -To use this driver:
-
-1. Add in your gfxconf.h:
- a) #define GFX_USE_GINPUT TRUE
- b) #define GINPUT_NEED_MOUSE TRUE
-
-2. To your makefile add the following lines:
- include $(GFXLIB)/drivers/ginput/touch/FT5x06/ginput_lld.mk
diff --git a/drivers/ginput/touch/MCU/ginput_lld_mouse_board_example.h b/drivers/ginput/touch/MCU/ginput_lld_mouse_board_template.h index 3109f818..e835f020 100644 --- a/drivers/ginput/touch/MCU/ginput_lld_mouse_board_example.h +++ b/drivers/ginput/touch/MCU/ginput_lld_mouse_board_template.h @@ -4,82 +4,77 @@ * * http://chibios-gfx.com/license.html */ -
-/**
- * @file drivers/ginput/touch/MCU/ginput_lld_mouse_board_example.h
- * @brief GINPUT Touch low level driver source for the MCU on the example board.
- *
- * @defgroup Mouse Mouse
- * @ingroup GINPUT
- *
- * @{
- */
-
-#ifndef _GINPUT_LLD_MOUSE_BOARD_H
-#define _GINPUT_LLD_MOUSE_BOARD_H
-
-/**
- * @brief Initialise the board for the touch.
- *
- * @notapi
- */
-static inline void init_board(void) {
- /* Code here */
- #error "ginputMCU: You must supply a definition for init_board for your board"
-}
-
-/**
- * @brief Check whether the surface is currently touched
- * @return TRUE if the surface is currently touched
- *
- * @notapi
- */
-static inline bool_t getpin_pressed(void) {
- /* Code here */
- #error "ginputMCU: You must supply a definition for getpin_pressed for your board"
-}
-
-/**
- * @brief Aquire the bus ready for readings
- *
- * @notapi
- */
-static inline void aquire_bus(void) {
- /* Code here */
- #error "ginputMCU: You must supply a definition for aquire_bus for your board"
-}
-
-/**
- * @brief Release the bus after readings
- *
- * @notapi
- */
-static inline void release_bus(void) {
- /* Code here */
- #error "ginputMCU: You must supply a definition for release_bus for your board"
-}
-
-/**
- * @brief Read an x value from touch controller
- * @return The value read from the controller
- *
- * @notapi
- */
-static inline uint16_t read_x_value(void) {
- /* Code here */
- #error "ginputMCU: You must supply a definition for read_x_value for your board"
-}
-
-/**
- * @brief Read an y value from touch controller
- * @return The value read from the controller
- *
- * @notapi
- */
-static inline uint16_t read_y_value(void) {
- /* Code here */
- #error "ginputMCU: You must supply a definition for read_y_value for your board"
-}
-
-#endif /* _GINPUT_LLD_MOUSE_BOARD_H */
-/** @} */
+ +/** + * @file drivers/ginput/touch/MCU/ginput_lld_mouse_board_template.h + * @brief GINPUT Touch low level driver source for the MCU on the example board. + * + * @defgroup Mouse Mouse + * @ingroup GINPUT + * + * @{ + */ + +#ifndef _GINPUT_LLD_MOUSE_BOARD_H +#define _GINPUT_LLD_MOUSE_BOARD_H + +/** + * @brief Initialise the board for the touch. + * + * @notapi + */ +static inline void init_board(void) { + +} + +/** + * @brief Check whether the surface is currently touched + * @return TRUE if the surface is currently touched + * + * @notapi + */ +static inline bool_t getpin_pressed(void) { + +} + +/** + * @brief Aquire the bus ready for readings + * + * @notapi + */ +static inline void aquire_bus(void) { + +} + +/** + * @brief Release the bus after readings + * + * @notapi + */ +static inline void release_bus(void) { + +} + +/** + * @brief Read an x value from touch controller + * @return The value read from the controller + * + * @notapi + */ +static inline uint16_t read_x_value(void) { + +} + +/** + * @brief Read an y value from touch controller + * @return The value read from the controller + * + * @notapi + */ +static inline uint16_t read_y_value(void) { + +} + +#endif /* _GINPUT_LLD_MOUSE_BOARD_H */ +/** @} */ + diff --git a/drivers/ginput/touch/MCU/readme.txt b/drivers/ginput/touch/MCU/readme.txt deleted file mode 100644 index c7bb90f8..00000000 --- a/drivers/ginput/touch/MCU/readme.txt +++ /dev/null @@ -1,8 +0,0 @@ -To use this driver:
-
-1. Add in your gfxconf.h:
- a) #define GFX_USE_GINPUT TRUE
- b) #define GINPUT_NEED_MOUSE TRUE
-
-2. To your makefile add the following lines:
- include $(GFXLIB)/drivers/ginput/touch/MCU/ginput_lld.mk
diff --git a/drivers/ginput/touch/STMPE811/ginput_lld_mouse.c b/drivers/ginput/touch/STMPE811/ginput_lld_mouse.c index 5e4b78ef..0d6aa147 100644 --- a/drivers/ginput/touch/STMPE811/ginput_lld_mouse.c +++ b/drivers/ginput/touch/STMPE811/ginput_lld_mouse.c @@ -22,13 +22,7 @@ #include "ginput/lld/mouse.h" -#if defined(GINPUT_MOUSE_USE_CUSTOM_BOARD) && GINPUT_MOUSE_USE_CUSTOM_BOARD - #include "ginput_lld_mouse_board.h" -#elif defined(BOARD_EMBEST_DMSTF4BB) - #include "ginput_lld_mouse_board_embest_dmstf4bb.h" -#else - #include "ginput_lld_mouse_board_example.h" -#endif +#include "ginput_lld_mouse_board.h" #ifndef STMP811_NO_GPIO_IRQPIN #define STMP811_NO_GPIO_IRQPIN FALSE diff --git a/drivers/ginput/touch/STMPE811/ginput_lld_mouse_board_example.h b/drivers/ginput/touch/STMPE811/ginput_lld_mouse_board_template.h index 926fd3fa..a60da459 100644 --- a/drivers/ginput/touch/STMPE811/ginput_lld_mouse_board_example.h +++ b/drivers/ginput/touch/STMPE811/ginput_lld_mouse_board_template.h @@ -4,72 +4,65 @@ * * http://chibios-gfx.com/license.html */ -
-/**
- * @file drivers/ginput/touch/STMPE811/ginput_lld_mouse_board_example.h
- * @brief GINPUT Touch low level driver source for the STMPE811 on the example board.
- *
- * @defgroup Mouse Mouse
- * @ingroup GINPUT
- * @{
- */
-
-#ifndef _GINPUT_LLD_MOUSE_BOARD_H
-#define _GINPUT_LLD_MOUSE_BOARD_H
-
-/**
- * @brief Initialise the board for the touch.
- *
- * @notapi
- */
-static void init_board(void)
-{
- /* Code here */
- #error "ginputSTMPE811: You must supply a definition for init_board for your board"
-}
-
-/**
- * @brief Check whether an interrupt is raised
- * @return TRUE if there is an interrupt signal present
- *
- * @notapi
- */
-static inline bool_t getpin_irq(void)
-{
- /* Code here */
- #error "ginputSTMPE811: You must supply a definition for getpin_irq for your board"
-}
-
-/**
- * @brief Write a value into a certain register
- *
- * @param[in] reg The register address
- * @param[in] n The amount of bytes (one or two)
- * @param[in] val The value
- *
- * @notapi
- */
-static void write_reg(uint8_t reg, uint8_t n, uint16_t val)
-{
- /* Code here */
- #error "ginputSTMPE811: You must supply a definition for write_reg for your board"
-}
-
-/**
- * @brief Read the value of a certain register
- *
- * @param[in] reg The register address
- * @param[in] n The amount of bytes (one or two)
- *
- * @return Data read from device (one byte or two depending on n param)
- *
- * @notapi
- */
-static uint16_t read_reg(uint8_t reg, uint8_t n)
-{
- /* Code here */
- #error "ginputSTMPE811: You must supply a definition for read_reg for your board"
-}
-
-#endif /* _GINPUT_LLD_MOUSE_BOARD_H */
-/** @} */
+ +/** + * @file drivers/ginput/touch/STMPE811/ginput_lld_mouse_board_template.h + * @brief GINPUT Touch low level driver source for the STMPE811 on the example board. + * + * @defgroup Mouse Mouse + * @ingroup GINPUT + * @{ + */ + +#ifndef _GINPUT_LLD_MOUSE_BOARD_H +#define _GINPUT_LLD_MOUSE_BOARD_H + +/** + * @brief Initialise the board for the touch. + * + * @notapi + */ +static void init_board(void) { + +} + +/** + * @brief Check whether an interrupt is raised + * @return TRUE if there is an interrupt signal present + * + * @notapi + */ +static inline bool_t getpin_irq(void) { + +} + +/** + * @brief Write a value into a certain register + * + * @param[in] reg The register address + * @param[in] n The amount of bytes (one or two) + * @param[in] val The value + * + * @notapi + */ +static void write_reg(uint8_t reg, uint8_t n, uint16_t val) { + +} + +/** + * @brief Read the value of a certain register + * + * @param[in] reg The register address + * @param[in] n The amount of bytes (one or two) + * + * @return Data read from device (one byte or two depending on n param) + * + * @notapi + */ +static uint16_t read_reg(uint8_t reg, uint8_t n) { + +} + +#endif /* _GINPUT_LLD_MOUSE_BOARD_H */ +/** @} */ + diff --git a/drivers/ginput/touch/STMPE811/readme.txt b/drivers/ginput/touch/STMPE811/readme.txt deleted file mode 100644 index 065840d8..00000000 --- a/drivers/ginput/touch/STMPE811/readme.txt +++ /dev/null @@ -1,20 +0,0 @@ -The STMPE811 driver comes with two different #defines to perfectly fit -your application: - - -STMPE811_NO_GPIO_IRQPIN -This Macro is meant to be set in your board file. When you set this macro to -TRUE, the GINPUT module will not use the IRQ lane which might be connected -to a GPIO pin to recognize interrupts by the STMPE811 controller. This -costs a few more I2C calls. -When the interrupt IRQ pin is connected to a GPIO of your MCU, set this -macro to FALSE. - - -STMP811_SLOW_CPU -If you have a slow CPU and you need to take care of your resources, you can -set this macro TRUE. This will save some IRQs and therefore a few I2C calls. -The disadvantage is a little higher response time. -If you don't want to draw continious lines on your display, it's recommended -to set this to TRUE anyways. - |