Extract _cmp function.
[bertos.git] / bertos / drv / lcd_text.c
index 3423eda6c0a7111f677b9085771cbfbe3c3e4265..94b46b773e583936d3d3ed6a30271edd13ea5a2b 100644 (file)
@@ -32,7 +32,6 @@
  *
  * \brief Generic text LCD driver (impl.).
  *
- * \version $Id$
  * \author Bernie Innocenti <bernie@codewiz.org>
  * \author Stefano Fedrigo <aleph@develer.com>
  */
@@ -55,6 +54,7 @@
 #define LCD_LAYERS 6
 
 #if CONFIG_KERN
+       #include <kern/sem.h>
        /** Semaphore to arbitrate access to the display. */
        static struct Semaphore lcd_semaphore;
        #define LOCK_LCD        sem_obtain(&lcd_semaphore)
@@ -437,6 +437,10 @@ static void lcd_setDefLayer(Layer *layer)
 #include <cfg/debug.h>
 void lcd_init(void)
 {
+       #if CONFIG_KERN
+       sem_init(&lcd_semaphore);
+       #endif
+
        int i;
 
        LIST_INIT(&lcd_Layers);