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"
@@ -146,7 +147,7 @@ int mcp23016Setup (const int pinBase, const int i2cAddress)
struct wiringPiNodeStruct *node ;
if ((fd = wiringPiI2CSetup (i2cAddress)) < 0)
return FALSE ;
return false ;
wiringPiI2CWriteReg8 (fd, MCP23016_IOCON0, IOCON_INIT) ;
wiringPiI2CWriteReg8 (fd, MCP23016_IOCON1, IOCON_INIT) ;
@@ -160,5 +161,5 @@ int mcp23016Setup (const int pinBase, const int i2cAddress)
node->data2 = wiringPiI2CReadReg8 (fd, MCP23016_OLAT0) ;
node->data3 = wiringPiI2CReadReg8 (fd, MCP23016_OLAT1) ;
return TRUE ;
return true ;
}