Skip to content

Commit

Permalink
Define __PROG_TYPES_COMPAT__
Browse files Browse the repository at this point in the history
This tells avr/pgmspace.h to define the prog_char types, even on newere
GCC versions where they are deprecated. Ideally, these types should be
avoided altogether, but for now keeping them around is easy.
  • Loading branch information
matthijskooijman committed Feb 5, 2014
1 parent 47fe180 commit 80c646a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/bitlash.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@
#define _BITLASH_H

#if defined(ARDUINO) // this detects the Arduino build environment
// On newer gcc versions, this enabled the prog_char etc. types
#define __PROG_TYPES_COMPAT__

#include "Arduino.h"
#define prog_char char PROGMEM
#define prog_uchar char PROGMEM
#endif // HIGH || ARDUINO

#if !defined(UNIX_BUILD)
Expand Down

0 comments on commit 80c646a

Please sign in to comment.