Skip to content

Commit 1fa5dd7

Browse files
committed
the constants SDA and SCL are not defined in rp2040.
The solution is to define them based on the equivalent rp2040 constants
1 parent ef7cf73 commit 1fa5dd7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/sensors/MagneticSensorI2C.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ struct MagneticSensorI2CConfig_s {
1616
// some predefined structures
1717
extern MagneticSensorI2CConfig_s AS5600_I2C,AS5048_I2C;
1818

19+
#if defined(TARGET_RP2040)
20+
#define SDA I2C_SDA
21+
#define SCL I2C_SCL
22+
#endif
23+
24+
1925
class MagneticSensorI2C: public Sensor{
2026
public:
2127
/**

0 commit comments

Comments
 (0)