diff options
author | inmarket <andrewh@inmarket.com.au> | 2013-05-25 01:26:52 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2013-05-25 01:26:52 +1000 |
commit | 7fbfde42aabbcd30cffba2fba35158236c0a6c6c (patch) | |
tree | e85c90a4f21974b706315d64209021e0b2bde764 /drivers/ginput | |
parent | 42006a67b5ccfd86f30d8a91cc474681c437eaf6 (diff) | |
download | uGFX-7fbfde42aabbcd30cffba2fba35158236c0a6c6c.tar.gz uGFX-7fbfde42aabbcd30cffba2fba35158236c0a6c6c.tar.bz2 uGFX-7fbfde42aabbcd30cffba2fba35158236c0a6c6c.zip |
GOS module, for operating system independance
GMISC fast floating point trig
GMISC fast fixed point trig
Diffstat (limited to 'drivers/ginput')
-rw-r--r-- | drivers/ginput/dial/GADC/ginput_lld_dial.c | 2 | ||||
-rw-r--r-- | drivers/ginput/toggle/Pal/ginput_lld_toggle.c | 14 | ||||
-rw-r--r-- | drivers/ginput/touch/ADS7843/ginput_lld_mouse.c | 14 | ||||
-rw-r--r-- | drivers/ginput/touch/MCU/ginput_lld_mouse.c | 14 | ||||
-rw-r--r-- | drivers/ginput/touch/MCU/ginput_lld_mouse_board_olimex_stm32_lcd.h | 20 | ||||
-rw-r--r-- | drivers/ginput/touch/STMPE811/ginput_lld_mouse.c | 6 |
6 files changed, 30 insertions, 40 deletions
diff --git a/drivers/ginput/dial/GADC/ginput_lld_dial.c b/drivers/ginput/dial/GADC/ginput_lld_dial.c index e9dc8a3f..96ac8675 100644 --- a/drivers/ginput/dial/GADC/ginput_lld_dial.c +++ b/drivers/ginput/dial/GADC/ginput_lld_dial.c @@ -14,8 +14,6 @@ * @{ */ -#include "ch.h" -#include "hal.h" #include "gfx.h" #if GFX_USE_GINPUT && GINPUT_NEED_DIAL diff --git a/drivers/ginput/toggle/Pal/ginput_lld_toggle.c b/drivers/ginput/toggle/Pal/ginput_lld_toggle.c index 9797b3c5..038253a4 100644 --- a/drivers/ginput/toggle/Pal/ginput_lld_toggle.c +++ b/drivers/ginput/toggle/Pal/ginput_lld_toggle.c @@ -1,9 +1,9 @@ -/* - * This file is subject to the terms of the GFX License, v1.0. If a copy of - * the license was not distributed with this file, you can obtain one at: - * - * http://chibios-gfx.com/license.html - */ +/*
+ * This file is subject to the terms of the GFX License, v1.0. If a copy of
+ * the license was not distributed with this file, you can obtain one at:
+ *
+ * http://chibios-gfx.com/license.html
+ */
/**
* @file drivers/ginput/toggle/Pal/ginput_lld_toggle.c
@@ -14,8 +14,6 @@ * @{
*/
-#include "ch.h"
-#include "hal.h"
#include "gfx.h"
#if (GFX_USE_GINPUT && GINPUT_NEED_TOGGLE) /*|| defined(__DOXYGEN__)*/
diff --git a/drivers/ginput/touch/ADS7843/ginput_lld_mouse.c b/drivers/ginput/touch/ADS7843/ginput_lld_mouse.c index ed4a3c32..7fedaa63 100644 --- a/drivers/ginput/touch/ADS7843/ginput_lld_mouse.c +++ b/drivers/ginput/touch/ADS7843/ginput_lld_mouse.c @@ -1,9 +1,9 @@ -/* - * This file is subject to the terms of the GFX License, v1.0. If a copy of - * the license was not distributed with this file, you can obtain one at: - * - * http://chibios-gfx.com/license.html - */ +/*
+ * This file is subject to the terms of the GFX License, v1.0. If a copy of
+ * the license was not distributed with this file, you can obtain one at:
+ *
+ * http://chibios-gfx.com/license.html
+ */
/**
* @file drivers/ginput/touch/ADS7843/ginput_lld_mouse.c
@@ -14,8 +14,6 @@ * @{
*/
-#include "ch.h"
-#include "hal.h"
#include "gfx.h"
#if (GFX_USE_GINPUT && GINPUT_NEED_MOUSE) /*|| defined(__DOXYGEN__)*/
diff --git a/drivers/ginput/touch/MCU/ginput_lld_mouse.c b/drivers/ginput/touch/MCU/ginput_lld_mouse.c index 7289f077..a5588b57 100644 --- a/drivers/ginput/touch/MCU/ginput_lld_mouse.c +++ b/drivers/ginput/touch/MCU/ginput_lld_mouse.c @@ -1,9 +1,9 @@ -/* - * This file is subject to the terms of the GFX License, v1.0. If a copy of - * the license was not distributed with this file, you can obtain one at: - * - * http://chibios-gfx.com/license.html - */ +/*
+ * This file is subject to the terms of the GFX License, v1.0. If a copy of
+ * the license was not distributed with this file, you can obtain one at:
+ *
+ * http://chibios-gfx.com/license.html
+ */
/**
* @file drivers/ginput/touch/MCU/ginput_lld_mouse.c
@@ -15,8 +15,6 @@ * @{
*/
-#include "ch.h"
-#include "hal.h"
#include "gfx.h"
#if (GFX_USE_GINPUT && GINPUT_NEED_MOUSE) /*|| defined(__DOXYGEN__)*/
diff --git a/drivers/ginput/touch/MCU/ginput_lld_mouse_board_olimex_stm32_lcd.h b/drivers/ginput/touch/MCU/ginput_lld_mouse_board_olimex_stm32_lcd.h index dddd4a7c..49a86380 100644 --- a/drivers/ginput/touch/MCU/ginput_lld_mouse_board_olimex_stm32_lcd.h +++ b/drivers/ginput/touch/MCU/ginput_lld_mouse_board_olimex_stm32_lcd.h @@ -1,9 +1,9 @@ -/* - * This file is subject to the terms of the GFX License, v1.0. If a copy of - * the license was not distributed with this file, you can obtain one at: - * - * http://chibios-gfx.com/license.html - */ +/*
+ * This file is subject to the terms of the GFX License, v1.0. If a copy of
+ * the license was not distributed with this file, you can obtain one at:
+ *
+ * http://chibios-gfx.com/license.html
+ */
/**
* @file drivers/ginput/touch/MCU/ginput_lld_mouse_board_olimex_stm32_lcd.h
@@ -105,13 +105,13 @@ static inline uint16_t read_x_value(void) { palSetPad(GPIOC, 2);
palClearPad(GPIOC, 3);
- chThdSleepMilliseconds(1);
+ gfxSleepMilliseconds(1);
adcConvert(&ADCD1, &adc_x_config, samples, ADC_BUF_DEPTH);
val1 = ((samples[0] + samples[1])/2);
palClearPad(GPIOC, 2);
palSetPad(GPIOC, 3);
- chThdSleepMilliseconds(1);
+ gfxSleepMilliseconds(1);
adcConvert(&ADCD1, &adc_x_config, samples, ADC_BUF_DEPTH);
val2 = ((samples[0] + samples[1])/2);
@@ -135,13 +135,13 @@ static inline uint16_t read_y_value(void) { palSetPad(GPIOC, 1);
palClearPad(GPIOC, 0);
- chThdSleepMilliseconds(1);
+ gfxSleepMilliseconds(1);
adcConvert(&ADCD1, &adc_y_config, samples, ADC_BUF_DEPTH);
val1 = ((samples[0] + samples[1])/2);
palClearPad(GPIOC, 1);
palSetPad(GPIOC, 0);
- chThdSleepMilliseconds(1);
+ gfxSleepMilliseconds(1);
adcConvert(&ADCD1, &adc_y_config, samples, ADC_BUF_DEPTH);
val2 = ((samples[0] + samples[1])/2);
diff --git a/drivers/ginput/touch/STMPE811/ginput_lld_mouse.c b/drivers/ginput/touch/STMPE811/ginput_lld_mouse.c index 88eceb39..be8ed207 100644 --- a/drivers/ginput/touch/STMPE811/ginput_lld_mouse.c +++ b/drivers/ginput/touch/STMPE811/ginput_lld_mouse.c @@ -14,8 +14,6 @@ * @{ */ -#include "ch.h" -#include "hal.h" #include "gfx.h" #include "stmpe811.h" @@ -61,7 +59,7 @@ void ginput_lld_mouse_init(void) init_board(); write_reg(STMPE811_REG_SYS_CTRL1, 1, 0x02); // Software chip reset - chThdSleepMilliseconds(10); + gfxSleepMilliseconds(10); write_reg(STMPE811_REG_SYS_CTRL2, 1, 0x0C); // Temperature sensor clock off, GPIO clock off, touch clock on, ADC clock on #if STMP811_NO_GPIO_IRQPIN @@ -70,7 +68,7 @@ void ginput_lld_mouse_init(void) write_reg(STMPE811_REG_INT_EN, 1, 0x01); // Interrupt on INT pin when touch is detected #endif write_reg(STMPE811_REG_ADC_CTRL1, 1, 0x48); // ADC conversion time = 80 clock ticks, 12-bit ADC, internal voltage refernce - chThdSleepMilliseconds(2); + gfxSleepMilliseconds(2); write_reg(STMPE811_REG_ADC_CTRL2, 1, 0x01); // ADC speed 3.25MHz write_reg(STMPE811_REG_GPIO_AF, 1, 0x00); // GPIO alternate function - OFF |