Get rid of the redundant ATTR_NEVER_INLINE macro which translated to the same as...
[pub/USBasp.git] / Projects / SerialToLCD / Lib / HD44780.h
index a800ae7..509f714 100644 (file)
@@ -1,13 +1,13 @@
 /*
              LUFA Library
 /*
              LUFA Library
-     Copyright (C) Dean Camera, 2012.
+     Copyright (C) Dean Camera, 2013.
 
   dean [at] fourwalledcubicle [dot] com
            www.lufa-lib.org
 */
 
 /*
 
   dean [at] fourwalledcubicle [dot] com
            www.lufa-lib.org
 */
 
 /*
-  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+  Copyright 2013  Dean Camera (dean [at] fourwalledcubicle [dot] com)
   Copyright 2012  Simon Foster (simon.foster [at] inbox [dot] com)
 
   Permission to use, copy, modify, distribute, and sell this
   Copyright 2012  Simon Foster (simon.foster [at] inbox [dot] com)
 
   Permission to use, copy, modify, distribute, and sell this
@@ -19,7 +19,7 @@
   advertising or publicity pertaining to distribution of the
   software without specific, written prior permission.
 
   advertising or publicity pertaining to distribution of the
   software without specific, written prior permission.
 
-  The author disclaim all warranties with regard to this
+  The author disclaims all warranties with regard to this
   software, including all implied warranties of merchantability
   and fitness.  In no event shall the author be liable for any
   special, indirect or consequential damages or any damages
   software, including all implied warranties of merchantability
   and fitness.  In no event shall the author be liable for any
   special, indirect or consequential damages or any damages
                #include <avr/power.h>
 
        /* Macros: */
                #include <avr/power.h>
 
        /* Macros: */
-               #define RS                  (0x10)      // PD4
-               #define ENABLE              (0x80)      // PD7
+               #define RS                  (1 << 4)    /* PD4 */
+               #define ENABLE              (1 << 7)    /* PD7 */
 
 
-               #define HI4_MASK            (0xF0)
-               #define LO4_MASK            (0x0F)      // PD0..3
+               #define HI4_MASK            0xF0
+               #define LO4_MASK            0x0F        /* PD0-PD3 */
 
 
-               #define ALL_BITS            (RS|ENABLE|LO4_MASK)
+               #define ALL_BITS            (RS | ENABLE | LO4_MASK)
 
 
-               #define HI4( c )            (( c & HI4_MASK ) >> 4 )
-               #define LO4( c )            (( c & LO4_MASK ) >> 0 )
+               #define HI4(c)              ((c & HI4_MASK) >> 4)
+               #define LO4(c)              ((c & LO4_MASK) >> 0)
 
                #define CMD_DISPLAY_ON      0x0C
 
        /* Function Prototypes: */
 
                #define CMD_DISPLAY_ON      0x0C
 
        /* Function Prototypes: */
-               void HD44780_Initialise(void);
+               void HD44780_Initialize(void);
                void HD44780_WriteData(const uint8_t c);
                void HD44780_WriteCommand(const uint8_t c);
 
                void HD44780_WriteData(const uint8_t c);
                void HD44780_WriteCommand(const uint8_t c);