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:
@@ -24,6 +24,8 @@
|
||||
***********************************************************************
|
||||
*/
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include <wiringPi.h>
|
||||
#include <wiringPiSPI.h>
|
||||
|
||||
@@ -65,12 +67,12 @@ int mcp3004Setup (const int pinBase, int spiChannel)
|
||||
struct wiringPiNodeStruct *node ;
|
||||
|
||||
if (wiringPiSPISetup (spiChannel, 1000000) < 0)
|
||||
return FALSE ;
|
||||
return false ;
|
||||
|
||||
node = wiringPiNewNode (pinBase, 8) ;
|
||||
|
||||
node->fd = spiChannel ;
|
||||
node->analogRead = myAnalogRead ;
|
||||
|
||||
return TRUE ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user