Skip to content

✨ Add tla2528 driver#5

Merged
kammce merged 24 commits intolibhal:mainfrom
MichaelYKersey:tla2528
Jan 12, 2025
Merged

✨ Add tla2528 driver#5
kammce merged 24 commits intolibhal:mainfrom
MichaelYKersey:tla2528

Conversation

@MichaelYKersey
Copy link
Copy Markdown
Contributor

The tla2528 is an i2c-based GPIO expander and ADC mux. It has 8 pins that can each be independently configured and operated as GPIO or ADC. This is a port of the tla2528 driver and adapters from the SJSU robotics team.

Features

  • ADC readings
  • Digital input readings (bus & individual)
  • Digital output writing (bus & individual) (push-pull & open-drain)
  • Adapters for each

Missing/future/unimplemented features:

  • TLA reset on object creation
  • ADC 16-bit precision (currently 12-bit, but chip allows for more)
  • ADC channel verification (redundancy)

@MichaelYKersey
Copy link
Copy Markdown
Contributor Author

currently, the reset command is declared as a private method but is unimplemented. Should it be removed? or is it better to leave it there for the binary interface consistency (I'm not sure how ABIs work)

@kammce kammce changed the title Tla2528 ✨ Add tla2528 driver Nov 27, 2024
Copy link
Copy Markdown
Member

@kammce kammce left a comment

Choose a reason for hiding this comment

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

Great work! Much of my comments have to do with formatting and documentation. The rest mostly looks good.

@kammce
Copy link
Copy Markdown
Member

kammce commented Nov 27, 2024

currently, the reset command is declared as a private method but is unimplemented. Should it be removed? or is it better to leave it there for the binary interface consistency (I'm not sure how ABIs work)

See my comment on what you should do about reset. As for ABI, class functions do not effect the ABI of a function so nothing to worry about from that angle.

@kammce
Copy link
Copy Markdown
Member

kammce commented Jan 8, 2025

I can perform a other review once CI has passed. I recently re-enabled clang-tidy static analysis which is why there are so many new errors popping up.

Copy link
Copy Markdown
Member

@kammce kammce left a comment

Choose a reason for hiding this comment

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

Looks good! One last little fix in the form of a C style cast and we can submit this.

Co-authored-by: Khalil Estell <kammcecorp@gmail.com>
@kammce kammce merged commit 90ec0be into libhal:main Jan 12, 2025
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.

2 participants