Skip to content

Commit

Permalink
fixed problem with implicit declaration in quantum/rgblight.c (qmk#8381)
Browse files Browse the repository at this point in the history
  • Loading branch information
Casper Weiss Bang committed Mar 28, 2020
1 parent 7bf9d9d commit 48d474a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 0 additions & 3 deletions drivers/oled/oled_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <string.h>

#include "progmem.h"
#ifndef __AVR__
# define memcpy_P(des, src, len) memcpy(des, src, len)
#endif

// Used commands from spec sheet: https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf
// for SH1106: https://www.velleman.eu/downloads/29/infosheets/sh1106_datasheet.pdf
Expand Down
1 change: 0 additions & 1 deletion quantum/rgblight.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
#ifdef VELOCIKEY_ENABLE
# include "velocikey.h"
#endif

#ifndef MIN
# define MIN(a, b) (((a) < (b)) ? (a) : (b))
#endif
Expand Down
5 changes: 5 additions & 0 deletions tmk_core/common/progmem.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
# include <avr/pgmspace.h>
#else
# define PROGMEM
# define memcpy_P(dest, src, n) memcpy(dest, src, n)
# define pgm_read_byte(p) *((unsigned char*)(p))
# define pgm_read_word(p) *((uint16_t*)(p))
# define pgm_read_dword(p) *((uint32_t*)(p))
# define pgm_read_ptr(address_short) *((void*)(address_short))
# define strcmp_P(s1, s2) strcmp(s1, s2)
# define strcpy_P(dest, src) strcpy(dest, src)
# define strlen_P(src) strlen(src)
#endif

0 comments on commit 48d474a

Please sign in to comment.