STM32 F3 Support over I2C
dehre opened this issue · comments
Hi,
I worked on this fork to add support for the STM32F3 boards over I2C.
This is a minimal working example that shows how to use the library with CMake on the STM32F3Discovery.
The setup is obviously a bit more tedious than the Arduino or the ESP32 ones, but, assuming a CMake project exists already, it's not bad:
include(FetchContent)
FetchContent_Declare(
ssd1306
GIT_REPOSITORY https://github.com/dehre/ssd1306.git
GIT_TAG stm32f3-i2c)
FetchContent_MakeAvailable(ssd1306)
target_compile_definitions(ssd1306 PRIVATE ${symbols_c_SYMB})
target_include_directories(ssd1306 PRIVATE ${stm32_hal_include_DIRS})
target_compile_options(ssd1306 PRIVATE ${CPU_PARAMETERS})
target_link_libraries(${EXECUTABLE} ssd1306)
target_include_directories(${EXECUTABLE} PRIVATE ${ssd1306_SOURCE_DIR}/src)
If you think the fork should be merged to master, we can open a PR, review the changes, and update the code as needed. Changes to the readme will be needed as well, but I first want to understand if it's feasible to proceed.