Skip to content

Commit

Permalink
Include stdint.h and define byte type when not on Arduino
Browse files Browse the repository at this point in the history
This is useful for building on desktop where neither Arduino.h nor WProgram.h exist
  • Loading branch information
gfgit committed Jun 25, 2023
1 parent 2247d98 commit bc7555e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion z21.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,21 @@
- 29.04.22 add WLANMaus CV Read and write special functions
*/

#if !defined(HAVE_WPROGRAM_H) && defined(__has_include)
# if __has_include(<WProgram.h>)
# define HAVE_WPROGRAM_H
# endif
#endif
// include types & constants of Wiring core API
#if defined(WIRING)
# include <Wiring.h>
#elif ARDUINO >= 100
# include <Arduino.h>
#else
#elif !defined(DO_NOT_USE_WPROGRAM_H) && defined(HAVE_WPROGRAM_H)
# include <WProgram.h>
#else
# include <stdint.h>
typedef uint8_t byte;
#endif

//--------------------------------------------------------------
Expand Down

0 comments on commit bc7555e

Please sign in to comment.