diff options
author | inmarket <andrewh@inmarket.com.au> | 2014-11-07 12:02:41 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2014-11-07 12:02:41 +1000 |
commit | bd041926b43676e2bf597c98149f9a6df8f8004b (patch) | |
tree | 22a9db91876fbac50f874539e42a0dad8b5de3fc /boards | |
parent | f552ba62afc6cdb72fbb1b4dcdcc96000895a1cd (diff) | |
download | uGFX-bd041926b43676e2bf597c98149f9a6df8f8004b.tar.gz uGFX-bd041926b43676e2bf597c98149f9a6df8f8004b.tar.bz2 uGFX-bd041926b43676e2bf597c98149f9a6df8f8004b.zip |
Allow a mouse driver to not return any results when it is polled.
Diffstat (limited to 'boards')
-rw-r--r-- | boards/base/Mikromedia-STM32-M4-ILI9341/gmouse_lld_MCU_board.h | 3 | ||||
-rw-r--r-- | boards/base/Olimex-STM32-LCD/gmouse_lld_MCU_board.h | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/boards/base/Mikromedia-STM32-M4-ILI9341/gmouse_lld_MCU_board.h b/boards/base/Mikromedia-STM32-M4-ILI9341/gmouse_lld_MCU_board.h index 15c00e66..bad8b9ab 100644 --- a/boards/base/Mikromedia-STM32-M4-ILI9341/gmouse_lld_MCU_board.h +++ b/boards/base/Mikromedia-STM32-M4-ILI9341/gmouse_lld_MCU_board.h @@ -57,7 +57,7 @@ static bool_t init_board(GMouse *m, unsigned driverinstance) { return TRUE; } -static void read_xyz(GMouse *m, GMouseReading *prd) { +static bool_t read_xyz(GMouse *m, GMouseReading *prd) { adcsample_t samples[ADC_NUM_CHANNELS * ADC_BUF_DEPTH]; (void) m; @@ -89,6 +89,7 @@ static void read_xyz(GMouse *m, GMouseReading *prd) { palClearPad(GPIOB, GPIOB_DRIVEA); palClearPad(GPIOB, GPIOB_DRIVEB); } + return TRUE; } #endif /* _LLD_GMOUSE_MCU_BOARD_H */ diff --git a/boards/base/Olimex-STM32-LCD/gmouse_lld_MCU_board.h b/boards/base/Olimex-STM32-LCD/gmouse_lld_MCU_board.h index 8c90946f..414587cf 100644 --- a/boards/base/Olimex-STM32-LCD/gmouse_lld_MCU_board.h +++ b/boards/base/Olimex-STM32-LCD/gmouse_lld_MCU_board.h @@ -73,7 +73,7 @@ static bool_t init_board(GMouse *m, unsigned driverinstance) { return TRUE; } -static void read_xyz(GMouse *m, GMouseReading *prd) { +static bool_t read_xyz(GMouse *m, GMouseReading *prd) { adcsample_t samples[ADC_NUM_CHANNELS * ADC_BUF_DEPTH]; uint16_t val1, val2; (void) m; @@ -130,6 +130,7 @@ static void read_xyz(GMouse *m, GMouseReading *prd) { // Set up for reading z again. We know it will be 20ms before we get called again so don't worry about settling time setup_z(); } + return TRUE; } #endif /* _LLD_GMOUSE_MCU_BOARD_H */ |