Small patch to make it compile with stm32duino / bluepill
mean00 opened this issue · 9 comments
Hi
Crude patch below so that it compiles with a bluepill running stm32duino
Not pretty, but it works tm
The only other thing needed is to define SDA & SCL but that can be easily done from outside
Hi, sorry if I couldn't answer you sooner.
Please can you try my patch to your problem.
Thanks Renzo
Thank you
I does compile :) (could not test it yet)
The last one missing is setting (default) SDA/SCL to PB7/PB6 on bluepill and it's all fine
I dont mind because i'm not using the arduino build system so i can override it easily
but others may be bothered
Hi, It's strange I used the SDA and SCL standard global variable to set It.
Can you check what kind of value you have on SDA and SCL?
Thanks
Hi
After looking into it, SDA and SCL are only defined when including SoftWire (i.e. soft SPI/I2C)
When using Wire (Hardware SPI/I2C) they are not defined at all, hence the problem
#ifdef _ _ STM32F1 _ _
#ifndef SDA
#define SDA PB7
#define SCL PB6
#endif
#endif
might do the trick ?
Hi
Try the last commit.
Thanks
Hi
Sorry for the delay
Almost there : it's #ifdef _ _ STM32F1 _ _ and not #ifdef STM32F1
(i.e. underscore underscore STM32F1 underscore underscore)
Aprt from that : :)
Hi
I push this change.
Try now Thanks.
Perfect
Thanks !
Thanks for your support.