-
Notifications
You must be signed in to change notification settings - Fork 64
Open
Description
in ArduiPi_OLED_lib.h there are some defines which perhaps conflict with general or arbitrary programs:
// Arduino Compatible type
typedef uint8_t boolean;
typedef uint8_t byte;
//...
// GCC Missing
#define max(a,b) (a>b?a:b)
#define min(a,b) (a<b?a:b)
especially the max/min #defines are ambiguous and possibly conflicting because this ArduiPi_OLED lib is used by gcc on the Pi, and for gcc both max and min are perhaps already defined in other libs (e.g., max / min (namespace std) or in different optional/proprietary libs)
solutions:
(a) drop all completely, they make no sense in a OLED lib for the Pi
(b) enable them only when a global MAKRO is not defined, like e.g. (how it's done fo millis() etc):
#ifndef ARDUIPIOLED_NO_ARDUINISH_COMPATIBILITY
Metadata
Metadata
Assignees
Labels
No labels