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

SNS - I2C Temperature (HYPE-14) #12

Merged
merged 28 commits into from
Oct 15, 2024
Merged

SNS - I2C Temperature (HYPE-14) #12

merged 28 commits into from
Oct 15, 2024

Conversation

davidbeechey
Copy link
Collaborator

@davidbeechey davidbeechey commented Aug 21, 2024

I2C temperature sensor (STTS22H) implementation in Rust for STM32. The specific board it's currently implemented for is the STM32L476RG (for ease of testing), but other boards can be very easily supported.

Data sheet: https://www.st.com/resource/en/datasheet/stts22h.pdf

Changes:

  • New Temperature struct which handles the logic for the STTS22H sensor given a HypedI2c struct.
  • HypedI2c is an abstraction of the Embassy I2C lib to make it agnostic to board type and to support adding a mock I2C implementation if needed in the future.

New boards added:

  • The boards/ directory contains all of the STM32 boards we will be supporting. Currently this is just boards/stm32l476rg.
  • Boards have three main functions: implementing IO for the specific board in the src/io folder, defining tasks that can be run in src/tasks (e.g. here we have a read_temp task which can be spawned which handles all of the setup and loop logic), and src/bin which includes the executables which can be flashed onto the boards themselves.

Tested and working!

@davidbeechey davidbeechey added the rewrite Rust rewrite label Aug 21, 2024
@davidbeechey davidbeechey self-assigned this Aug 21, 2024
@davidbeechey davidbeechey marked this pull request as ready for review September 5, 2024 21:14
@davidbeechey davidbeechey added the needs reviews Needs reviews, otherwise finished label Sep 5, 2024
@arjunnaha arjunnaha changed the title SNS - I2C Temperature SNS - I2C Temperature (HYPE-14) Sep 24, 2024
@davidbeechey davidbeechey requested a review from kshxtij October 8, 2024 17:59
Copy link
Contributor

@kshxtij kshxtij left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, hopefully won't need to keep i2c_temp_test once the debugger is done

@davidbeechey davidbeechey removed the needs reviews Needs reviews, otherwise finished label Oct 9, 2024
@davidbeechey davidbeechey merged commit 98f74de into main Oct 15, 2024
8 checks passed
@davidbeechey davidbeechey deleted the sns-i2c_temp branch October 15, 2024 11:00
siny-over-cosy pushed a commit that referenced this pull request Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rewrite Rust rewrite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants