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:
@@ -22,6 +22,8 @@
|
||||
***********************************************************************
|
||||
*/
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include <wiringPi.h>
|
||||
#include <wiringPiSPI.h>
|
||||
|
||||
@@ -66,7 +68,7 @@ int max5322Setup (const int pinBase, int spiChannel)
|
||||
unsigned char spiData [2] ;
|
||||
|
||||
if (wiringPiSPISetup (spiChannel, 8000000) < 0) // 10MHz Max
|
||||
return FALSE ;
|
||||
return false ;
|
||||
|
||||
node = wiringPiNewNode (pinBase, 2) ;
|
||||
|
||||
@@ -80,5 +82,5 @@ int max5322Setup (const int pinBase, int spiChannel)
|
||||
|
||||
wiringPiSPIDataRW (node->fd, spiData, 2) ;
|
||||
|
||||
return TRUE ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user