daniel-thompson / i2c-star

A clone of the i2c-tiny-usb based upon STM32 and libopencm3
GNU General Public License v3.0
124 stars 31 forks source link

added support for maplemini board #13

Closed matthiasb85 closed 4 years ago

matthiasb85 commented 4 years ago

Hi, I found this project while looking for STM32 based i2c-tiny-usb alternatives. Since I only had a couple of maplemini boards on stock at home, I tried to execute your code directly with no success. Even though the used board (with an STM32F103CBT6 µC) is comparable and similarly wired (wr. to the USB pins), I wasn't able to establish a USB connection. After comparing the schematics for "bluepill" and "maplemini" based development boards I realized, that the maplemini uses GPIOB9 to disable USB connectivity through a transistor on USBDP. The bluepill board directly uses a pull up resistor on USBDP. Configuring GPIOB9 as output and clearing it afterwards, brought me success :-) I encapsulated my changes in an #ifdef, such that the code needs to be build with CFLAGS=-DUSE_MAPLEMINI in order to include my changes. Feel free to merge, if you are interested :-)

BR Matthias

daniel-thompson commented 4 years ago

Applied. Thanks!