Skip to content

Fix for OSX compile errors #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions cpp/arduino/Arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ inline unsigned int makeWord(unsigned char h, unsigned char l) { return (h << 8)

#define word(...) makeWord(__VA_ARGS__)




// audio
// TODO Add audio to GODMODE mock
inline void tone(uint8_t _pin, unsigned int frequency, unsigned long duration) { }
inline void tone(uint8_t _pin, unsigned int frequency) { }
inline void noTone(uint8_t _pin) { }
3 changes: 3 additions & 0 deletions cpp/arduino/ArduinoDefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,6 @@
#define TIMER5B 17
#define TIMER5C 18

#if defined(__AVR_ATmega328P__) || defined(__AVR_ATmega32U4__) || defined(__AVR_ATmega328__) || defined(__AVR_ATmega168__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
#define LED_BUILTIN 13
#endif
2 changes: 1 addition & 1 deletion cpp/arduino/HardwareSerial.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class HardwareSerial : public Stream, public ObservableDataStream
inline size_t write(long n) { return write((uint8_t)n); }
inline size_t write(unsigned int n) { return write((uint8_t)n); }
inline size_t write(int n) { return write((uint8_t)n); }
// using Print::write; // pull in write(str) and write(buf, size) from Print
using Print::write; // pull in write(str) and write(buf, size) from Print
operator bool() { return true; }

};
Expand Down
1 change: 1 addition & 0 deletions cpp/arduino/Print.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once

#include <stdio.h>
#include <avr/pgmspace.h>
#include "WString.h"

#define DEC 10
Expand Down
1 change: 1 addition & 0 deletions cpp/arduino/WString.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <string.h>
#include <algorithm>
#include <iostream>
#include <cmath>
#include "AvrMath.h"
#include "WCharacter.h"

Expand Down