Move to CMake
This commit is contained in:
		@@ -23,7 +23,8 @@
 | 
			
		||||
////////////////////////////////////////////////////////////////////////////////
 | 
			
		||||
// utility code, some of this could be exposed in the DateTime API if needed
 | 
			
		||||
 | 
			
		||||
static uint8_t daysInMonth [] PROGMEM = { 31,28,31,30,31,30,31,31,30,31,30,31 };
 | 
			
		||||
//static uint8_t daysInMonth [] PROGMEM = { 31,28,31,30,31,30,31,31,30,31,30,31 };
 | 
			
		||||
static const uint8_t daysInMonth [] PROGMEM = { 31,28,31,30,31,30,31,31,30,31,30,31 }; // Modified
 | 
			
		||||
 | 
			
		||||
// number of days since 2000/01/01, valid for 2001..2099
 | 
			
		||||
static uint16_t date2days(uint16_t y, uint8_t m, uint8_t d) {
 | 
			
		||||
 
 | 
			
		||||
@@ -123,7 +123,7 @@
 | 
			
		||||
extern "C" unsigned long millis(void);
 | 
			
		||||
 | 
			
		||||
// declare a static string
 | 
			
		||||
#define P(name)   static const prog_uchar name[] PROGMEM
 | 
			
		||||
#define P(name)   static const char name[] PROGMEM
 | 
			
		||||
 | 
			
		||||
// returns the number of elements in the array
 | 
			
		||||
#define SIZE(array) (sizeof(array) / sizeof(*array))
 | 
			
		||||
@@ -189,13 +189,13 @@ public:
 | 
			
		||||
 | 
			
		||||
  // output a string stored in program memory, usually one defined
 | 
			
		||||
  // with the P macro
 | 
			
		||||
  void printP(const prog_uchar *str);
 | 
			
		||||
  void printP(const char *str);
 | 
			
		||||
 | 
			
		||||
  // inline overload for printP to handle signed char strings
 | 
			
		||||
  void printP(const prog_char *str) { printP((prog_uchar*)str); }
 | 
			
		||||
  //void printP(const char *str) { printP((char*)str); }
 | 
			
		||||
 | 
			
		||||
  // output raw data stored in program memory
 | 
			
		||||
  void writeP(const prog_uchar *data, size_t length);
 | 
			
		||||
  void writeP(const char *data, size_t length);
 | 
			
		||||
 | 
			
		||||
  // output HTML for a radio button
 | 
			
		||||
  void radioButton(const char *name, const char *val,
 | 
			
		||||
@@ -374,7 +374,7 @@ size_t WebServer::write(const char *buffer, size_t length)
 | 
			
		||||
  return m_client.write((const uint8_t *)buffer, length);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void WebServer::writeP(const prog_uchar *data, size_t length)
 | 
			
		||||
void WebServer::writeP(const char *data, size_t length)
 | 
			
		||||
{
 | 
			
		||||
  // copy data out of program memory into local storage, write out in
 | 
			
		||||
  // chunks of 32 bytes to avoid extra short TCP/IP packets
 | 
			
		||||
@@ -396,7 +396,7 @@ void WebServer::writeP(const prog_uchar *data, size_t length)
 | 
			
		||||
    m_client.write(buffer, bufferEnd);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void WebServer::printP(const prog_uchar *str)
 | 
			
		||||
void WebServer::printP(const char *str)
 | 
			
		||||
{
 | 
			
		||||
  // copy data out of program memory into local storage, write out in
 | 
			
		||||
  // chunks of 32 bytes to avoid extra short TCP/IP packets
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user