X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fdrv%2Flcd_text.c;h=ca27f22d50d2ec81c40d20292bf2363d8997ed65;hb=0774f0adbb7c85ab48bc4ba83e3c0473f68bd73b;hp=3ded59f3809dc0efaa93d3fc2305fc0285beb5ec;hpb=a5fdf78b7671975a529c0f6dcf085a275241a9f3;p=bertos.git diff --git a/bertos/drv/lcd_text.c b/bertos/drv/lcd_text.c index 3ded59f3..ca27f22d 100644 --- a/bertos/drv/lcd_text.c +++ b/bertos/drv/lcd_text.c @@ -27,39 +27,43 @@ * the GNU General Public License. * * Copyright 2005 Develer S.r.l. (http://www.develer.com/) - * + * All Rights Reserved. * --> * * \brief Generic text LCD driver (impl.). * * \version $Id$ - * \author Bernardo Innocenti + * \author Bernie Innocenti * \author Stefano Fedrigo */ #include "lcd_text.h" #include "lcd_hd44.h" -#include // timer_delay() -#include // _formatted_write() -#include // LIST_EMPTY() + #include // BV() #include +#include // timer_delay() + +#include // _formatted_write() +#include // LIST_EMPTY() + #include // strlen() /** Maximum number of layers. */ #define LCD_LAYERS 6 -#if CONFIG_KERNEL +#if CONFIG_KERN + #include /** Semaphore to arbitrate access to the display. */ static struct Semaphore lcd_semaphore; #define LOCK_LCD sem_obtain(&lcd_semaphore) #define UNLOCK_LCD sem_release(&lcd_semaphore) -#else /* !CONFIG_KERNEL */ +#else /* !CONFIG_KERN */ #define LOCK_LCD do {} while (0) #define UNLOCK_LCD do {} while (0) -#endif /* !CONFIG_KERNEL */ +#endif /* !CONFIG_KERN */ DECLARE_LIST_TYPE(Layer); @@ -88,7 +92,7 @@ void lcd_setAddr(Layer *layer, lcdpos_t addr) layer->addr = addr; } -#if CONFIG_KERNEL +#if CONFIG_KERN void lcd_lock(void) { @@ -101,7 +105,7 @@ void lcd_unlock(void) UNLOCK_LCD; } -#endif /* CONFIG_KERNEL */ +#endif /* CONFIG_KERN */ /** @@ -448,16 +452,4 @@ void lcd_init(void) lcd_setCursor(0); } -#if CONFIG_TEST -void lcd_test(void) -{ - int i; - - for (i = 0; i < LCD_ROWS * LCD_COLS; ++i) - { - lcd_putCharUnlocked('0' + (i % 10), lcd_DefLayer); - timer_delay(100); - } -} -#endif /* CONFIG_TEST */