Make writeUnitName() const-correct

Changed the writeUnitName() parameter from
"char* name" to "const char* name".
This will prevent warnings or errors when a string literal or
an array of type "const char" is passed to it.
This commit is contained in:
Pharap 2020-07-09 21:46:05 -04:00 committed by Scott Allen
parent 30fb448db5
commit 5563599c6d
2 changed files with 2 additions and 2 deletions

View File

@ -1099,7 +1099,7 @@ uint8_t Arduboy2Base::readUnitName(char* name)
return dest; return dest;
} }
void Arduboy2Base::writeUnitName(char* name) void Arduboy2Base::writeUnitName(const char* name)
{ {
bool done = false; bool done = false;
uint8_t dest = eepromUnitName; uint8_t dest = eepromUnitName;

View File

@ -1207,7 +1207,7 @@ class Arduboy2Base : public Arduboy2Core
* \see readUnitName() writeUnitID() Arduboy2::bootLogoExtra() * \see readUnitName() writeUnitID() Arduboy2::bootLogoExtra()
* ARDUBOY_UNIT_NAME_BUFFER_SIZE ARDUBOY_UNIT_NAME_LEN Arduboy2::font5x7 * ARDUBOY_UNIT_NAME_BUFFER_SIZE ARDUBOY_UNIT_NAME_LEN Arduboy2::font5x7
*/ */
void writeUnitName(char* name); void writeUnitName(const char* name);
/** \brief /** \brief
* Read the "Show Boot Logo" flag in system EEPROM. * Read the "Show Boot Logo" flag in system EEPROM.