Switch to stdbool.h
- Add `#include <stdbool.h> to all files previously using the `TRUE`/`FALSE` macros - Replace all instances of `TRUE`/`FALSE` with `true`/`false`, respectively - Definitions of `TRUE`/`FALSE` macros retained in wiringPi.h for compatibility.
This commit is contained in:
12
devLib/lcd.c
12
devLib/lcd.c
@@ -27,16 +27,12 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include <wiringPi.h>
|
||||
|
||||
#include "lcd.h"
|
||||
|
||||
#ifndef TRUE
|
||||
# define TRUE (1==1)
|
||||
# define FALSE (1==2)
|
||||
#endif
|
||||
|
||||
// HD44780U Commands
|
||||
|
||||
#define LCD_CLEAR 0x01
|
||||
@@ -483,9 +479,9 @@ int lcdInit (const int rows, const int cols, const int bits,
|
||||
|
||||
// Rest of the initialisation sequence
|
||||
|
||||
lcdDisplay (lcdFd, TRUE) ;
|
||||
lcdCursor (lcdFd, FALSE) ;
|
||||
lcdCursorBlink (lcdFd, FALSE) ;
|
||||
lcdDisplay (lcdFd, true) ;
|
||||
lcdCursor (lcdFd, false) ;
|
||||
lcdCursorBlink (lcdFd, false) ;
|
||||
lcdClear (lcdFd) ;
|
||||
|
||||
putCommand (lcd, LCD_ENTRY | LCD_ENTRY_ID) ;
|
||||
|
||||
Reference in New Issue
Block a user