Browse Source

Fix, consolidate PSTR aliases (#20812)

Co-authored-by: Jason Smith <jason.inet@gmail.com>
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
vanilla_fb_2.0.x
Rockman18 4 years ago
committed by Scott Lahteine
parent
commit
910059adcb
  1. 10
      Marlin/src/HAL/DUE/HAL.h
  2. 4
      Marlin/src/HAL/ESP32/HAL.h
  3. 5
      Marlin/src/HAL/LINUX/HAL.h
  4. 21
      Marlin/src/HAL/LINUX/include/Arduino.h
  5. 13
      Marlin/src/HAL/LPC1768/HAL.h
  6. 8
      Marlin/src/HAL/STM32/HAL.h
  7. 8
      Marlin/src/HAL/STM32F1/HAL.h
  8. 11
      Marlin/src/HAL/TEENSY31_32/HAL.h
  9. 11
      Marlin/src/HAL/TEENSY35_36/HAL.h
  10. 11
      Marlin/src/HAL/TEENSY40_41/HAL.h
  11. 2
      Marlin/src/HAL/shared/Marduino.h
  12. 189
      Marlin/src/HAL/shared/progmem.h
  13. 4
      Marlin/src/lcd/extui/lib/mks_ui/draw_dialog.cpp
  14. 2
      Marlin/src/lcd/extui/lib/mks_ui/draw_ui.h
  15. 4
      Marlin/src/lcd/extui/lib/mks_ui/wifi_module.cpp
  16. 4
      Marlin/src/lcd/extui/lib/mks_ui/wifi_upload.cpp
  17. 164
      Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_macros.h
  18. 6
      buildroot/tests/mks_robin_nano35-tests

10
Marlin/src/HAL/DUE/HAL.h

@ -83,16 +83,6 @@
// On AVR this is in math.h? // On AVR this is in math.h?
#define square(x) ((x)*(x)) #define square(x) ((x)*(x))
#ifndef strncpy_P
#define strncpy_P(dest, src, num) strncpy((dest), (src), (num))
#endif
// Fix bug in pgm_read_ptr
#undef pgm_read_ptr
#define pgm_read_ptr(addr) (*((void**)(addr)))
#undef pgm_read_word
#define pgm_read_word(addr) (*((uint16_t*)(addr)))
typedef int8_t pin_t; typedef int8_t pin_t;
#define SHARED_SERVOS HAS_SERVOS #define SHARED_SERVOS HAS_SERVOS

4
Marlin/src/HAL/ESP32/HAL.h

@ -67,10 +67,6 @@ extern portMUX_TYPE spinlock;
#define ENABLE_ISRS() if (spinlock.owner != portMUX_FREE_VAL) portEXIT_CRITICAL(&spinlock) #define ENABLE_ISRS() if (spinlock.owner != portMUX_FREE_VAL) portEXIT_CRITICAL(&spinlock)
#define DISABLE_ISRS() portENTER_CRITICAL(&spinlock) #define DISABLE_ISRS() portENTER_CRITICAL(&spinlock)
// Fix bug in pgm_read_ptr
#undef pgm_read_ptr
#define pgm_read_ptr(addr) (*(addr))
// ------------------------ // ------------------------
// Types // Types
// ------------------------ // ------------------------

5
Marlin/src/HAL/LINUX/HAL.h

@ -113,8 +113,3 @@ inline void HAL_reboot() {} // reboot the board or restart the bootloader
FORCE_INLINE static void DELAY_CYCLES(uint64_t x) { FORCE_INLINE static void DELAY_CYCLES(uint64_t x) {
Clock::delayCycles(x); Clock::delayCycles(x);
} }
// Add strcmp_P if missing
#ifndef strcmp_P
#define strcmp_P(a, b) strcmp((a), (b))
#endif

21
Marlin/src/HAL/LINUX/include/Arduino.h

@ -73,27 +73,6 @@ extern "C" {
void GpioDisableInt(uint32_t port, uint32_t pin); 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 // Time functions
extern "C" void delay(const int milis); extern "C" void delay(const int milis);
void _delay_ms(const int delay); void _delay_ms(const int delay);

13
Marlin/src/HAL/LPC1768/HAL.h

@ -214,16 +214,3 @@ void HAL_clear_reset_source(void);
uint8_t HAL_get_reset_source(void); uint8_t HAL_get_reset_source(void);
inline void HAL_reboot() {} // reboot the board or restart the bootloader inline void HAL_reboot() {} // reboot the board or restart the bootloader
// Add strcmp_P if missing
#ifndef strcmp_P
#define strcmp_P(a, b) strcmp((a), (b))
#endif
#ifndef strcat_P
#define strcat_P(a, b) strcat((a), (b))
#endif
#ifndef strcpy_P
#define strcpy_P(a, b) strcpy((a), (b))
#endif

8
Marlin/src/HAL/STM32/HAL.h

@ -106,14 +106,6 @@
// On AVR this is in math.h? // On AVR this is in math.h?
#define square(x) ((x)*(x)) #define square(x) ((x)*(x))
#ifndef strncpy_P
#define strncpy_P(dest, src, num) strncpy((dest), (src), (num))
#endif
// Fix bug in pgm_read_ptr
#undef pgm_read_ptr
#define pgm_read_ptr(addr) (*(addr))
// ------------------------ // ------------------------
// Types // Types
// ------------------------ // ------------------------

8
Marlin/src/HAL/STM32F1/HAL.h

@ -152,14 +152,6 @@ void HAL_idletask();
// On AVR this is in math.h? // On AVR this is in math.h?
#define square(x) ((x)*(x)) #define square(x) ((x)*(x))
#ifndef strncpy_P
#define strncpy_P(dest, src, num) strncpy((dest), (src), (num))
#endif
// Fix bug in pgm_read_ptr
#undef pgm_read_ptr
#define pgm_read_ptr(addr) (*(addr))
#define RST_POWER_ON 1 #define RST_POWER_ON 1
#define RST_EXTERNAL 2 #define RST_EXTERNAL 2
#define RST_BROWN_OUT 4 #define RST_BROWN_OUT 4

11
Marlin/src/HAL/TEENSY31_32/HAL.h

@ -74,17 +74,6 @@ typedef int8_t pin_t;
#define ENABLE_ISRS() __enable_irq() #define ENABLE_ISRS() __enable_irq()
#define DISABLE_ISRS() __disable_irq() #define DISABLE_ISRS() __disable_irq()
#ifndef strncpy_P
#define strncpy_P(dest, src, num) strncpy((dest), (src), (num))
#endif
// Fix bug in pgm_read_ptr
#undef pgm_read_ptr
#define pgm_read_ptr(addr) (*((void**)(addr)))
// Add type-checking to pgm_read_word
#undef pgm_read_word
#define pgm_read_word(addr) (*((uint16_t*)(addr)))
inline void HAL_init() {} inline void HAL_init() {}
// Clear the reset reason // Clear the reset reason

11
Marlin/src/HAL/TEENSY35_36/HAL.h

@ -80,17 +80,6 @@ typedef int8_t pin_t;
#undef sq #undef sq
#define sq(x) ((x)*(x)) #define sq(x) ((x)*(x))
#ifndef strncpy_P
#define strncpy_P(dest, src, num) strncpy((dest), (src), (num))
#endif
// Fix bug in pgm_read_ptr
#undef pgm_read_ptr
#define pgm_read_ptr(addr) (*((void**)(addr)))
// Add type-checking to pgm_read_word
#undef pgm_read_word
#define pgm_read_word(addr) (*((uint16_t*)(addr)))
inline void HAL_init() {} inline void HAL_init() {}
// Clear reset reason // Clear reset reason

11
Marlin/src/HAL/TEENSY40_41/HAL.h

@ -92,21 +92,10 @@ typedef int8_t pin_t;
#undef sq #undef sq
#define sq(x) ((x)*(x)) #define sq(x) ((x)*(x))
#ifndef strncpy_P
#define strncpy_P(dest, src, num) strncpy((dest), (src), (num))
#endif
// Don't place string constants in PROGMEM // Don't place string constants in PROGMEM
#undef PSTR #undef PSTR
#define PSTR(str) ({static const char *data = (str); &data[0];}) #define PSTR(str) ({static const char *data = (str); &data[0];})
// Fix bug in pgm_read_ptr
#undef pgm_read_ptr
#define pgm_read_ptr(addr) (*((void**)(addr)))
// Add type-checking to pgm_read_word
#undef pgm_read_word
#define pgm_read_word(addr) (*((uint16_t*)(addr)))
// Enable hooks into idle and setup for HAL // Enable hooks into idle and setup for HAL
#define HAL_IDLETASK 1 #define HAL_IDLETASK 1
FORCE_INLINE void HAL_idletask() {} FORCE_INLINE void HAL_idletask() {}

2
Marlin/src/HAL/shared/Marduino.h

@ -81,3 +81,5 @@
#ifndef UNUSED #ifndef UNUSED
#define UNUSED(x) ((void)(x)) #define UNUSED(x) ((void)(x))
#endif #endif
#include "progmem.h"

189
Marlin/src/HAL/shared/progmem.h

@ -0,0 +1,189 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
#ifndef __AVR__
#ifndef __PGMSPACE_H_
// This define should prevent reading the system pgmspace.h if included elsewhere
// This is not normally needed.
#define __PGMSPACE_H_ 1
#endif
#ifndef PROGMEM
#define PROGMEM
#endif
#ifndef PGM_P
#define PGM_P const char *
#endif
#ifndef PSTR
#define PSTR(str) (str)
#endif
#ifndef F
#define F(str) (str)
#endif
#ifndef _SFR_BYTE
#define _SFR_BYTE(n) (n)
#endif
#ifndef memchr_P
#define memchr_P(str, c, len) memchr((str), (c), (len))
#endif
#ifndef memcmp_P
#define memcmp_P(a, b, n) memcmp((a), (b), (n))
#endif
#ifndef memcpy_P
#define memcpy_P(dest, src, num) memcpy((dest), (src), (num))
#endif
#ifndef memmem_P
#define memmem_P(a, alen, b, blen) memmem((a), (alen), (b), (blen))
#endif
#ifndef memrchr_P
#define memrchr_P(str, val, len) memrchr((str), (val), (len))
#endif
#ifndef strcat_P
#define strcat_P(dest, src) strcat((dest), (src))
#endif
#ifndef strchr_P
#define strchr_P(str, c) strchr((str), (c))
#endif
#ifndef strchrnul_P
#define strchrnul_P(str, c) strchrnul((str), (c))
#endif
#ifndef strcmp_P
#define strcmp_P(a, b) strcmp((a), (b))
#endif
#ifndef strcpy_P
#define strcpy_P(dest, src) strcpy((dest), (src))
#endif
#ifndef strcasecmp_P
#define strcasecmp_P(a, b) strcasecmp((a), (b))
#endif
#ifndef strcasestr_P
#define strcasestr_P(a, b) strcasestr((a), (b))
#endif
#ifndef strlcat_P
#define strlcat_P(dest, src, len) strlcat((dest), (src), (len))
#endif
#ifndef strlcpy_P
#define strlcpy_P(dest, src, len) strlcpy((dest), (src), (len))
#endif
#ifndef strlen_P
#define strlen_P(s) strlen((const char *)(s))
#endif
#ifndef strnlen_P
#define strnlen_P(str, len) strnlen((str), (len))
#endif
#ifndef strncmp_P
#define strncmp_P(a, b, n) strncmp((a), (b), (n))
#endif
#ifndef strncasecmp_P
#define strncasecmp_P(a, b, n) strncasecmp((a), (b), (n))
#endif
#ifndef strncat_P
#define strncat_P(a, b, n) strncat((a), (b), (n))
#endif
#ifndef strncpy_P
#define strncpy_P(a, b, n) strncmp((a), (b), (n))
#endif
#ifndef strpbrk_P
#define strpbrk_P(str, chrs) strpbrk((str), (chrs))
#endif
#ifndef strrchr_P
#define strrchr_P(str, c) strrchr((str), (c))
#endif
#ifndef strsep_P
#define strsep_P(strp, delim) strsep((strp), (delim))
#endif
#ifndef strspn_P
#define strspn_P(str, chrs) strspn((str), (chrs))
#endif
#ifndef strstr_P
#define strstr_P(a, b) strstr((a), (b))
#endif
#ifndef sprintf_P
#define sprintf_P(s, ...) sprintf((s), __VA_ARGS__)
#endif
#ifndef vfprintf_P
#define vfprintf_P(s, ...) vfprintf((s), __VA_ARGS__)
#endif
#ifndef printf_P
#define printf_P(...) printf(__VA_ARGS__)
#endif
#ifndef snprintf_P
#define snprintf_P(s, n, ...) snprintf((s), (n), __VA_ARGS__)
#endif
#ifndef vsprintf_P
#define vsprintf_P(s, ...) vsprintf((s),__VA_ARGS__)
#endif
#ifndef vsnprintf_P
#define vsnprintf_P(s, n, ...) vsnprintf((s), (n),__VA_ARGS__)
#endif
#ifndef fprintf_P
#define fprintf_P(s, ...) fprintf((s), __VA_ARGS__)
#endif
#ifndef pgm_read_byte
#define pgm_read_byte(addr) (*(const unsigned char *)(addr))
#endif
#ifndef pgm_read_word
#define pgm_read_word(addr) (*(const unsigned short *)(addr))
#endif
#ifndef pgm_read_dword
#define pgm_read_dword(addr) (*(const unsigned long *)(addr))
#endif
#ifndef pgm_read_float
#define pgm_read_float(addr) (*(const float *)(addr))
#endif
#ifndef pgm_read_byte_near
#define pgm_read_byte_near(addr) pgm_read_byte(addr)
#endif
#ifndef pgm_read_word_near
#define pgm_read_word_near(addr) pgm_read_word(addr)
#endif
#ifndef pgm_read_dword_near
#define pgm_read_dword_near(addr) pgm_read_dword(addr)
#endif
#ifndef pgm_read_float_near
#define pgm_read_float_near(addr) pgm_read_float(addr)
#endif
#ifndef pgm_read_byte_far
#define pgm_read_byte_far(addr) pgm_read_byte(addr)
#endif
#ifndef pgm_read_word_far
#define pgm_read_word_far(addr) pgm_read_word(addr)
#endif
#ifndef pgm_read_dword_far
#define pgm_read_dword_far(addr) pgm_read_dword(addr)
#endif
#ifndef pgm_read_float_far
#define pgm_read_float_far(addr) pgm_read_float(addr)
#endif
#ifndef pgm_read_pointer
#define pgm_read_pointer
#endif
// Fix bug in pgm_read_ptr
#undef pgm_read_ptr
#define pgm_read_ptr(addr) (*((void**)(addr)))
#endif // __AVR__

4
Marlin/src/lcd/extui/lib/mks_ui/draw_dialog.cpp

@ -257,7 +257,7 @@ void lv_draw_dialog(uint8_t type) {
lv_label_set_text(labelOk, print_file_dialog_menu.confirm); lv_label_set_text(labelOk, print_file_dialog_menu.confirm);
} }
} }
else if (DIALOG_IS(TYPE_UPDATE_ESP_FIRMARE)) { else if (DIALOG_IS(TYPE_UPDATE_ESP_FIRMWARE)) {
// nothing to do // nothing to do
} }
#endif #endif
@ -426,7 +426,7 @@ void lv_draw_dialog(uint8_t type) {
lv_obj_align(labelDialog, nullptr, LV_ALIGN_CENTER, 0, -20); lv_obj_align(labelDialog, nullptr, LV_ALIGN_CENTER, 0, -20);
} }
} }
else if (DIALOG_IS(TYPE_UPDATE_ESP_FIRMARE)) { else if (DIALOG_IS(TYPE_UPDATE_ESP_FIRMWARE)) {
lv_label_set_text(labelDialog, DIALOG_UPDATE_WIFI_FIRMWARE_EN); lv_label_set_text(labelDialog, DIALOG_UPDATE_WIFI_FIRMWARE_EN);
lv_obj_align(labelDialog, NULL, LV_ALIGN_CENTER, 0, -20); lv_obj_align(labelDialog, NULL, LV_ALIGN_CENTER, 0, -20);
} }

2
Marlin/src/lcd/extui/lib/mks_ui/draw_ui.h

@ -77,7 +77,7 @@
#include "draw_keyboard.h" #include "draw_keyboard.h"
#include "draw_encoder_settings.h" #include "draw_encoder_settings.h"
#include "../../inc/MarlinConfigPre.h" #include "../../../../inc/MarlinConfigPre.h"
#if ENABLED(MKS_WIFI_MODULE) #if ENABLED(MKS_WIFI_MODULE)
#include "wifiSerial.h" #include "wifiSerial.h"

4
Marlin/src/lcd/extui/lib/mks_ui/wifi_module.cpp

@ -1663,7 +1663,7 @@ void mks_esp_wifi_init() {
clear_cur_ui(); clear_cur_ui();
draw_dialog(DIALOG_TYPE_UPDATE_ESP_FIRMARE); draw_dialog(DIALOG_TYPE_UPDATE_ESP_FIRMWARE);
if (wifi_upload(1) >= 0) { if (wifi_upload(1) >= 0) {
f_unlink("1:/MKS_WIFI_CUR"); f_unlink("1:/MKS_WIFI_CUR");
@ -1717,7 +1717,7 @@ void mks_wifi_firmware_update() {
clear_cur_ui(); clear_cur_ui();
lv_draw_dialog(DIALOG_TYPE_UPDATE_ESP_FIRMARE); lv_draw_dialog(DIALOG_TYPE_UPDATE_ESP_FIRMWARE);
lv_task_handler(); lv_task_handler();
watchdog_refresh(); watchdog_refresh();

4
Marlin/src/lcd/extui/lib/mks_ui/wifi_upload.cpp

@ -152,7 +152,7 @@ uint32_t getData(unsigned byteCnt, const uint8_t *buf, int ofst) {
uint32_t val = 0; uint32_t val = 0;
if (buf && byteCnt) { if (buf && byteCnt) {
unsigned int shiftCnt = 0; unsigned int shiftCnt = 0;
NOMORE(byteCnt, 4); NOMORE(byteCnt, 4U);
do { do {
val |= (uint32_t)buf[ofst++] << shiftCnt; val |= (uint32_t)buf[ofst++] << shiftCnt;
shiftCnt += 8; shiftCnt += 8;
@ -164,7 +164,7 @@ uint32_t getData(unsigned byteCnt, const uint8_t *buf, int ofst) {
// Put 1-4 bytes of a value in little-endian order into a buffer beginning at a specified offset. // Put 1-4 bytes of a value in little-endian order into a buffer beginning at a specified offset.
void putData(uint32_t val, unsigned byteCnt, uint8_t *buf, int ofst) { void putData(uint32_t val, unsigned byteCnt, uint8_t *buf, int ofst) {
if (buf && byteCnt) { if (buf && byteCnt) {
NOMORE(byteCnt, 4); NOMORE(byteCnt, 4U);
do { do {
buf[ofst++] = (uint8_t)(val & 0xFF); buf[ofst++] = (uint8_t)(val & 0xFF);
val >>= 8; val >>= 8;

164
Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_macros.h

@ -144,169 +144,7 @@ e-mail : support@circuitsathome.com
#define UHS_GET_DPI(x) (x) #define UHS_GET_DPI(x) (x)
#endif #endif
#ifndef __AVR__ #include "../../../../HAL/shared/progmem.h"
#ifndef __PGMSPACE_H_
// This define should prevent reading the system pgmspace.h if included elsewhere
// This is not normally needed.
#define __PGMSPACE_H_ 1
#endif
#ifndef PROGMEM
#define PROGMEM
#endif
#ifndef PGM_P
#define PGM_P const char *
#endif
#ifndef PSTR
#define PSTR(str) (str)
#endif
#ifndef F
#define F(str) (str)
#endif
#ifndef _SFR_BYTE
#define _SFR_BYTE(n) (n)
#endif
#ifndef memchr_P
#define memchr_P(str, c, len) memchr((str), (c), (len))
#endif
#ifndef memcmp_P
#define memcmp_P(a, b, n) memcmp((a), (b), (n))
#endif
#ifndef memcpy_P
#define memcpy_P(dest, src, num) memcpy((dest), (src), (num))
#endif
#ifndef memmem_P
#define memmem_P(a, alen, b, blen) memmem((a), (alen), (b), (blen))
#endif
#ifndef memrchr_P
#define memrchr_P(str, val, len) memrchr((str), (val), (len))
#endif
#ifndef strcat_P
#define strcat_P(dest, src) strcat((dest), (src))
#endif
#ifndef strchr_P
#define strchr_P(str, c) strchr((str), (c))
#endif
#ifndef strchrnul_P
#define strchrnul_P(str, c) strchrnul((str), (c))
#endif
#ifndef strcmp_P
#define strcmp_P(a, b) strcmp((a), (b))
#endif
#ifndef strcpy_P
#define strcpy_P(dest, src) strcpy((dest), (src))
#endif
#ifndef strcasecmp_P
#define strcasecmp_P(a, b) strcasecmp((a), (b))
#endif
#ifndef strcasestr_P
#define strcasestr_P(a, b) strcasestr((a), (b))
#endif
#ifndef strlcat_P
#define strlcat_P(dest, src, len) strlcat((dest), (src), (len))
#endif
#ifndef strlcpy_P
#define strlcpy_P(dest, src, len) strlcpy((dest), (src), (len))
#endif
#ifndef strlen_P
#define strlen_P(s) strlen((const char *)(s))
#endif
#ifndef strnlen_P
#define strnlen_P(str, len) strnlen((str), (len))
#endif
#ifndef strncmp_P
#define strncmp_P(a, b, n) strncmp((a), (b), (n))
#endif
#ifndef strncasecmp_P
#define strncasecmp_P(a, b, n) strncasecmp((a), (b), (n))
#endif
#ifndef strncat_P
#define strncat_P(a, b, n) strncat((a), (b), (n))
#endif
#ifndef strncpy_P
#define strncpy_P(a, b, n) strncmp((a), (b), (n))
#endif
#ifndef strpbrk_P
#define strpbrk_P(str, chrs) strpbrk((str), (chrs))
#endif
#ifndef strrchr_P
#define strrchr_P(str, c) strrchr((str), (c))
#endif
#ifndef strsep_P
#define strsep_P(strp, delim) strsep((strp), (delim))
#endif
#ifndef strspn_P
#define strspn_P(str, chrs) strspn((str), (chrs))
#endif
#ifndef strstr_P
#define strstr_P(a, b) strstr((a), (b))
#endif
#ifndef sprintf_P
#define sprintf_P(s, ...) sprintf((s), __VA_ARGS__)
#endif
#ifndef vfprintf_P
#define vfprintf_P(s, ...) vfprintf((s), __VA_ARGS__)
#endif
#ifndef printf_P
#define printf_P(...) printf(__VA_ARGS__)
#endif
#ifndef snprintf_P
#define snprintf_P(s, n, ...) ((s), (n), __VA_ARGS__)
#endif
#ifndef vsprintf_P
#define vsprintf_P(s, ...) ((s),__VA_ARGS__)
#endif
#ifndef vsnprintf_P
#define vsnprintf_P(s, n, ...) ((s), (n),__VA_ARGS__)
#endif
#ifndef fprintf_P
#define fprintf_P(s, ...) ((s), __VA_ARGS__)
#endif
#ifndef pgm_read_byte
#define pgm_read_byte(addr) (*(const unsigned char *)(addr))
#endif
#ifndef pgm_read_word
#define pgm_read_word(addr) (*(const unsigned short *)(addr))
#endif
#ifndef pgm_read_dword
#define pgm_read_dword(addr) (*(const unsigned long *)(addr))
#endif
#ifndef pgm_read_float
#define pgm_read_float(addr) (*(const float *)(addr))
#endif
#ifndef pgm_read_byte_near
#define pgm_read_byte_near(addr) pgm_read_byte(addr)
#endif
#ifndef pgm_read_word_near
#define pgm_read_word_near(addr) pgm_read_word(addr)
#endif
#ifndef pgm_read_dword_near
#define pgm_read_dword_near(addr) pgm_read_dword(addr)
#endif
#ifndef pgm_read_float_near
#define pgm_read_float_near(addr) pgm_read_float(addr)
#endif
#ifndef pgm_read_byte_far
#define pgm_read_byte_far(addr) pgm_read_byte(addr)
#endif
#ifndef pgm_read_word_far
#define pgm_read_word_far(addr) pgm_read_word(addr)
#endif
#ifndef pgm_read_dword_far
#define pgm_read_dword_far(addr) pgm_read_dword(addr)
#endif
#ifndef pgm_read_float_far
#define pgm_read_float_far(addr) pgm_read_float(addr)
#endif
#ifndef pgm_read_pointer
#define pgm_read_pointer
#endif
#endif
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// HANDY MACROS // HANDY MACROS

6
buildroot/tests/mks_robin_nano35-tests

@ -30,9 +30,9 @@ exec_test $1 $2 "MKS Robin v2 nano Emulated DOGM SPI" "$3"
# #
use_example_configs Mks/Robin use_example_configs Mks/Robin
opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO_V2 opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO_V2
opt_disable TFT_INTERFACE_FSMC TFT_COLOR_UI TOUCH_SCREEN TFT_RES_320x240 opt_disable TFT_INTERFACE_FSMC TFT_COLOR_UI TOUCH_SCREEN TFT_RES_320x240 SERIAL_PORT_2
opt_enable TFT_INTERFACE_SPI TFT_LVGL_UI TFT_RES_480x320 opt_enable TFT_INTERFACE_SPI TFT_LVGL_UI TFT_RES_480x320 MKS_WIFI_MODULE
exec_test $1 $2 "MKS Robin v2 nano LVGL SPI" "$3" exec_test $1 $2 "MKS Robin v2 nano LVGL SPI w/ WiFi" "$3"
# #
# MKS Robin v2 nano New Color UI 480x320 SPI # MKS Robin v2 nano New Color UI 480x320 SPI

Loading…
Cancel
Save