Use bool instead of boolean in drivers (#888)
In the Arduino IDE, boolean is an alias for bool. The Arduino IDE might deprecate boolean in the future. See https://github.com/arduino/Arduino/issues/4673 for details. Command: find drivers -type f | xargs sed -i 's/boolean/bool/g'
This commit is contained in:
committed by
Patrick Fallberg
parent
4ea0c88ac8
commit
a941827157
@@ -95,7 +95,7 @@ void SPIFlash::unselect()
|
||||
}
|
||||
|
||||
/// setup SPI, read device ID etc...
|
||||
boolean SPIFlash::initialize()
|
||||
bool SPIFlash::initialize()
|
||||
{
|
||||
#if defined(SPCR) && defined(SPSR)
|
||||
_SPCR = SPCR;
|
||||
@@ -180,7 +180,7 @@ void SPIFlash::readBytes(uint32_t addr, void* buf, uint16_t len)
|
||||
}
|
||||
|
||||
/// Send a command to the flash chip, pass TRUE for isWrite when its a write command
|
||||
void SPIFlash::command(uint8_t cmd, boolean isWrite)
|
||||
void SPIFlash::command(uint8_t cmd, bool isWrite)
|
||||
{
|
||||
#if defined(__AVR_ATmega32U4__) // Arduino Leonardo, MoteinoLeo
|
||||
DDRB |= B00000001; // Make sure the SS pin (PB0 - used by RFM12B on MoteinoLeo R1) is set as output HIGH!
|
||||
@@ -201,7 +201,7 @@ void SPIFlash::command(uint8_t cmd, boolean isWrite)
|
||||
}
|
||||
|
||||
/// check if the chip is busy erasing/writing
|
||||
boolean SPIFlash::busy()
|
||||
bool SPIFlash::busy()
|
||||
{
|
||||
/*
|
||||
select();
|
||||
|
||||
@@ -117,8 +117,8 @@ class SPIFlash
|
||||
public:
|
||||
static uint8_t UNIQUEID[8]; //!< Storage for unique identifier
|
||||
SPIFlash(uint8_t slaveSelectPin, uint16_t jedecID=0); //!< Constructor
|
||||
boolean initialize(); //!< setup SPI, read device ID etc...
|
||||
void command(uint8_t cmd, boolean isWrite=
|
||||
bool initialize(); //!< setup SPI, read device ID etc...
|
||||
void command(uint8_t cmd, bool isWrite=
|
||||
false); //!< Send a command to the flash chip, pass TRUE for isWrite when its a write command
|
||||
uint8_t readStatus(); //!< return the STATUS register
|
||||
uint8_t readByte(uint32_t addr); //!< read 1 byte from flash memory
|
||||
@@ -126,7 +126,7 @@ public:
|
||||
void writeByte(uint32_t addr, uint8_t byt); //!< Write 1 byte to flash memory
|
||||
void writeBytes(uint32_t addr, const void* buf,
|
||||
uint16_t len); //!< write multiple bytes to flash memory (up to 64K), if define SPIFLASH_SST25TYPE is set AAI Word Programming will be used
|
||||
boolean busy(); //!< check if the chip is busy erasing/writing
|
||||
bool busy(); //!< check if the chip is busy erasing/writing
|
||||
void chipErase(); //!< erase entire flash memory array
|
||||
void blockErase4K(uint32_t address); //!< erase a 4Kbyte block
|
||||
void blockErase32K(uint32_t address); //!< erase a 32Kbyte block
|
||||
|
||||
Reference in New Issue
Block a user