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:
Connor Gibson
2025-06-01 15:15:56 -07:00
parent 3cf394b206
commit 55e189eda5
42 changed files with 262 additions and 277 deletions

View File

@@ -23,6 +23,7 @@
*/
#include <stdio.h>
#include <stdbool.h>
#include <pthread.h>
#include "wiringPi.h"
@@ -177,7 +178,7 @@ int mcp23017Setup (const int pinBase, const int i2cAddress)
struct wiringPiNodeStruct *node ;
if ((fd = wiringPiI2CSetup (i2cAddress)) < 0)
return FALSE ;
return false ;
wiringPiI2CWriteReg8 (fd, MCP23x17_IOCON, IOCON_INIT) ;
@@ -191,5 +192,5 @@ int mcp23017Setup (const int pinBase, const int i2cAddress)
node->data2 = wiringPiI2CReadReg8 (fd, MCP23x17_OLATA) ;
node->data3 = wiringPiI2CReadReg8 (fd, MCP23x17_OLATB) ;
return TRUE ;
return true ;
}