Skip to content

Commit 7e80091

Browse files
committed
rename to Arduino.cmake
1 parent a34eb03 commit 7e80091

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

ArduinoLibrary.cmake renamed to Arduino.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# ArduinoLibrary.cmake
1+
# Arduino.cmake
22
# Defines a function to easily add Arduino-style libraries to your CMake project.
33
#
44
# Example usage for arduino-SAM library from GitHub
5-
# Place this in your CMakeLists.txt after including ArduinoLibrary.cmake
5+
# Place this in your CMakeLists.txt after including Arduino.cmake
66
#
7-
# include(${CMAKE_SOURCE_DIR}/ArduinoLibrary.cmake)
7+
# include(${CMAKE_SOURCE_DIR}/Arduino.cmake)
88
# arduino_library(arduino-SAM "https://github.com/pschatzmann/arduino-SAM")
99
# target_link_libraries(your_target PRIVATE arduino-SAM)
1010

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ target_compile_features(arduino_emulator PUBLIC cxx_std_17)
6060
target_compile_options(arduino_emulator PRIVATE -Wno-nonportable-include-path)
6161

6262
# Include Arduino library functions
63-
include(${CMAKE_CURRENT_SOURCE_DIR}/ArduinoLibrary.cmake)
63+
include(${CMAKE_CURRENT_SOURCE_DIR}/Arduino.cmake)
6464

6565
if (USE_RPI)
6666
target_compile_options(arduino_emulator PUBLIC -DUSE_RPI)

examples/bme280-i2c/bme280-i2c.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ void setup() {
1212
Serial.println("Reading basic values from BME280");
1313
// Begin communication over I2C
1414
Wire.begin();
15-
if (mySensor.beginI2C() == false) {
15+
if (!mySensor.beginI2C(Wire)) {
1616
Serial.println("The sensor did not respond. Please check wiring.");
1717
while (1); // Freeze
1818
}

examples/bme280-spi/bme280-spi.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ BME280 mySensor;
1111
void setup() {
1212
Serial.begin(9600);
1313
Serial.println("Reading basic values from BME280");
14-
// Begin communication over SPI. Use pin 10 as CS.
15-
if (mySensor.beginSPI(csPin) == false) {
14+
// Begin communication over SPI. Use pin 13 as CS.
15+
if (!mySensor.beginSPI(csPin)) {
1616
Serial.println("The sensor did not respond. Please check wiring.");
1717
while (1); // Freeze
1818
}

0 commit comments

Comments
 (0)