Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STM32 F3 Support over I2C #140

Open
dehre opened this issue Mar 22, 2022 · 0 comments
Open

STM32 F3 Support over I2C #140

dehre opened this issue Mar 22, 2022 · 0 comments

Comments

@dehre
Copy link

dehre commented Mar 22, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant