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:
@@ -23,6 +23,7 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdbool.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#include "wiringPi.h"
|
||||
@@ -132,7 +133,7 @@ int mcp23008Setup (const int pinBase, const int i2cAddress)
|
||||
struct wiringPiNodeStruct *node ;
|
||||
|
||||
if ((fd = wiringPiI2CSetup (i2cAddress)) < 0)
|
||||
return FALSE ;
|
||||
return false ;
|
||||
|
||||
wiringPiI2CWriteReg8 (fd, MCP23x08_IOCON, IOCON_INIT) ;
|
||||
|
||||
@@ -145,5 +146,5 @@ int mcp23008Setup (const int pinBase, const int i2cAddress)
|
||||
node->digitalWrite = myDigitalWrite ;
|
||||
node->data2 = wiringPiI2CReadReg8 (fd, MCP23x08_OLAT) ;
|
||||
|
||||
return TRUE ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user