Skip to content

Commit

Permalink
fix: Compile for SAMD and MBED devices
Browse files Browse the repository at this point in the history
  • Loading branch information
zfields committed Mar 9, 2021
1 parent 1c53e69 commit 1164324
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "Nintendo R.O.B. Control Library"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = v1.1.1
PROJECT_NUMBER = v1.1.2

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=NesRob
version=1.1.1
version=1.1.2
author=Zachary J. Fields
maintainer=Zachary J. Fields <[email protected]>
sentence=Manipulates the Nintendo R.O.B. (Robotic Operating Buddy).
Expand Down
8 changes: 8 additions & 0 deletions src/hal_arduino.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ HalArduino::digitalWrite (
unsigned int pin_,
int state_
) const {
#if defined(ARDUINO_ARCH_MBED) || defined(ARDUINO_ARCH_SAMD)
::digitalWrite(pin_,static_cast<PinStatus>(state_));
#else
::digitalWrite(pin_,state_);
#endif
return make_error_code(hal_error::success);
}

Expand All @@ -47,7 +51,11 @@ HalArduino::pinMode (
unsigned int pin_,
int mode_
) const {
#if defined(ARDUINO_ARCH_MBED) || defined(ARDUINO_ARCH_SAMD)
::pinMode(pin_,static_cast<PinMode>(mode_));
#else
::pinMode(pin_,mode_);
#endif
return make_error_code(hal_error::success);
}

Expand Down

0 comments on commit 1164324

Please sign in to comment.