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:
@@ -38,6 +38,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <unistd.h>
|
||||
@@ -47,10 +48,6 @@
|
||||
#include <wiringPi.h>
|
||||
#include <lcd.h>
|
||||
|
||||
#ifndef TRUE
|
||||
# define TRUE (1==1)
|
||||
# define FALSE (1==2)
|
||||
#endif
|
||||
|
||||
static unsigned char newChar [8] =
|
||||
{
|
||||
@@ -247,13 +244,13 @@ int main (int argc, char *argv[])
|
||||
lcdPuts (lcdHandle, "User Char: ") ;
|
||||
lcdPutchar (lcdHandle, 2) ;
|
||||
|
||||
lcdCursor (lcdHandle, TRUE) ;
|
||||
lcdCursorBlink (lcdHandle, TRUE) ;
|
||||
lcdCursor (lcdHandle, true) ;
|
||||
lcdCursorBlink (lcdHandle, true) ;
|
||||
|
||||
waitForEnter () ;
|
||||
|
||||
lcdCursor (lcdHandle, FALSE) ;
|
||||
lcdCursorBlink (lcdHandle, FALSE) ;
|
||||
lcdCursor (lcdHandle, false) ;
|
||||
lcdCursorBlink (lcdHandle, false) ;
|
||||
lcdClear (lcdHandle) ;
|
||||
|
||||
for (;;)
|
||||
|
||||
Reference in New Issue
Block a user