Fix, consolidate PSTR aliases (#20812)
Co-authored-by: Jason Smith <jason.inet@gmail.com> Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
		@@ -113,8 +113,3 @@ inline void HAL_reboot() {}  // reboot the board or restart the bootloader
 | 
			
		||||
FORCE_INLINE static void DELAY_CYCLES(uint64_t x) {
 | 
			
		||||
  Clock::delayCycles(x);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Add strcmp_P if missing
 | 
			
		||||
#ifndef strcmp_P
 | 
			
		||||
  #define strcmp_P(a, b) strcmp((a), (b))
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -73,27 +73,6 @@ extern "C" {
 | 
			
		||||
  void GpioDisableInt(uint32_t port, uint32_t pin);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Program Memory
 | 
			
		||||
#define pgm_read_ptr(addr)        (*((void**)(addr)))
 | 
			
		||||
#define pgm_read_byte_near(addr)  (*((uint8_t*)(addr)))
 | 
			
		||||
#define pgm_read_float_near(addr) (*((float*)(addr)))
 | 
			
		||||
#define pgm_read_word_near(addr)  (*((uint16_t*)(addr)))
 | 
			
		||||
#define pgm_read_dword_near(addr) (*((uint32_t*)(addr)))
 | 
			
		||||
#define pgm_read_byte(addr)       pgm_read_byte_near(addr)
 | 
			
		||||
#define pgm_read_float(addr)      pgm_read_float_near(addr)
 | 
			
		||||
#define pgm_read_word(addr)       pgm_read_word_near(addr)
 | 
			
		||||
#define pgm_read_dword(addr)      pgm_read_dword_near(addr)
 | 
			
		||||
 | 
			
		||||
using std::memcpy;
 | 
			
		||||
#define memcpy_P memcpy
 | 
			
		||||
#define sprintf_P sprintf
 | 
			
		||||
#define strstr_P strstr
 | 
			
		||||
#define strncpy_P strncpy
 | 
			
		||||
#define vsnprintf_P vsnprintf
 | 
			
		||||
#define strcpy_P strcpy
 | 
			
		||||
#define snprintf_P snprintf
 | 
			
		||||
#define strlen_P strlen
 | 
			
		||||
 | 
			
		||||
// Time functions
 | 
			
		||||
extern "C" void delay(const int milis);
 | 
			
		||||
void _delay_ms(const int delay);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user