this is my first post to this forum, hello to everyone!
I needed the CapacitiveSensor library for one of my projects and the CapacitiveSense library didn't compile for my Maple Mine (Baite) project. The definitions for STM32F1 where missing and I took them from the OneWire_STM libray and added those to CapacitiveSensor.h:
Code: Select all
#elif defined(__arm__) && defined(__STM32F1__) #define PIN_TO_BASEREG(pin) (0) #define PIN_TO_BITMASK(pin) ( pin ) #define IO_REG_TYPE unsigned int #define IO_REG_ASM #define DIRECT_READ(base, pin) digitalRead(pin) #define DIRECT_WRITE_LOW(base, pin) digitalWrite(pin, LOW) #define DIRECT_WRITE_HIGH(base, pin) digitalWrite(pin, HIGH) #define DIRECT_MODE_INPUT(base, pin) pinMode(pin,INPUT) #define DIRECT_MODE_OUTPUT(base, pin) pinMode(pin,OUTPUT) #warning "OneWire. Fallback mode. Using API calls for pinMode,digitalRead and digitalWrite. Operation of this library is not guaranteed on this architecture."