diff --git a/api/Common.h b/api/Common.h
index 44fe95e8..d117a0b3 100644
--- a/api/Common.h
+++ b/api/Common.h
@@ -6,9 +6,15 @@
 extern "C"{
 #endif
 
+#ifdef __cplusplus
+  #define ARD_CHAR_ENUM_XWEZPiBoACuGnH : char
+#else
+  #define ARD_CHAR_ENUM_XWEZPiBoACuGnH __attribute__ ((__packed__))
+#endif
+
 void yield(void);
 
-typedef enum {
+typedef enum ARD_CHAR_ENUM_XWEZPiBoACuGnH{
   LOW     = 0,
   HIGH    = 1,
   CHANGE  = 2,
@@ -16,7 +22,7 @@ typedef enum {
   RISING  = 4,
 } PinStatus;
 
-typedef enum {
+typedef enum ARD_CHAR_ENUM_XWEZPiBoACuGnH{
   INPUT            = 0x0,
   OUTPUT           = 0x1,
   INPUT_PULLUP     = 0x2,
@@ -24,7 +30,7 @@ typedef enum {
   OUTPUT_OPENDRAIN = 0x4,
 } PinMode;
 
-typedef enum {
+typedef enum ARD_CHAR_ENUM_XWEZPiBoACuGnH{
   LSBFIRST = 0,
   MSBFIRST = 1,
 } BitOrder;
diff --git a/api/HardwareSPI.h b/api/HardwareSPI.h
index 8b8affd0..44f69d1e 100644
--- a/api/HardwareSPI.h
+++ b/api/HardwareSPI.h
@@ -26,7 +26,7 @@
 
 namespace arduino {
 
-typedef enum {
+typedef enum ARD_CHAR_ENUM_XWEZPiBoACuGnH {
   SPI_MODE0 = 0,
   SPI_MODE1 = 1,
   SPI_MODE2 = 2,
diff --git a/api/Stream.h b/api/Stream.h
index e81c71ba..e92834ab 100644
--- a/api/Stream.h
+++ b/api/Stream.h
@@ -39,7 +39,7 @@ namespace arduino {
 // This enumeration provides the lookahead options for parseInt(), parseFloat()
 // The rules set out here are used until either the first valid character is found
 // or a time out occurs due to lack of input.
-enum LookaheadMode{
+enum LookaheadMode: uint8_t {
     SKIP_ALL,       // All invalid characters are ignored.
     SKIP_NONE,      // Nothing is skipped, and the stream is not touched unless the first waiting character is valid.
     SKIP_WHITESPACE // Only tabs, spaces, line feeds & carriage returns are skipped.
@@ -130,4 +130,4 @@ class Stream : public Print
 
 }
 
-using arduino::Stream;
\ No newline at end of file
+using arduino::Stream;