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

CC1120 Temprature Sensor #286

Draft
wants to merge 25 commits into
base: main
Choose a base branch
from
Draft

CC1120 Temprature Sensor #286

wants to merge 25 commits into from

Conversation

twilkhoo
Copy link

Purpose

Explain the purpose of the PR here, including references to any existing Notion tasks.
https://uworbital.notion.site/Write-CC1120-temperature-sensor-driver-496d24bb4311426faae72d3d1e640762

Adds the driver for the CC1120 temperature sensor, using the ADC helper functions we have.
Branches off the adc helper functions pr. Once that's merged in, I can amend this branch.

New Changes

  • Adds support to use the temperature sensor on the CC1120 now.

Testing

  • Haven't tested physically yet, but automated tests should pass.

Outstanding Changes

  • Need to test.

kepler452b123 and others added 25 commits November 5, 2023 18:51
And implemented helper function to get readings for a group
(assuming proper settings in adc.c file)
And implemented helper function to get readings for a group
(assuming proper settings in adc.c file)
…BC-firmware into kashifb/adc-helper-functions
- adcGetSingleData gets group data,
and then finds and returns data for single
channel
- Added macros for adc resolution mode and max
group size (necessary for adcGetData since malloc
isn't allowed)
- Added another error code, if channel ID isn't
found when adcGetSingleData is called
- Streamlined adcGetSingleData and adcGetGroupData
to use helper function adcGetGroupReadings.
They only differ in how they store/convert the
digital values to analog
-adcGroupSize stores the # of channels for each
group for each adc module.
-This should be updated every time a new channel
is added to a group in the ADGxSEL register.
Should also be updated when a channel is removed
from a group.
Didn't change pinmux, didn't enable ADC2, didn't
change any settings for ADC1.
-Fixed some style issues / removed unnecessary code
-Abstracted away ADC_base_t and group information by
making enums
-Made each channel of ADC into constants so users can
easily configure channels in other files
-Configured channelID setting in HAL which is needed
to check if the channel matches the data in
adcGetSingleData
hardcoded table in header file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants