Skip to content

Commit 63366cd

Browse files
committed
separation esp32 + esp8266
1 parent 9f689db commit 63366cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sensors/MagneticSensorSPI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ word MagneticSensorSPI::read(word angle_register){
128128
spi->transfer16(command);
129129
digitalWrite(chip_select_pin,HIGH);
130130

131-
#if defined( ESP_H ) // if ESP32 board
131+
#if defined(ESP_H) && defined(ARDUINO_ARCH_ESP32) // if ESP32 board
132132
delayMicroseconds(50); // why do we need to delay 50us on ESP32? In my experience no extra delays are needed, on any of the architectures I've tested...
133133
#else
134134
delayMicroseconds(1); // delay 1us, the minimum time possible in plain arduino. 350ns is the required time for AMS sensors, 80ns for MA730, MA702

0 commit comments

Comments
 (0)