Conversation
…sync Add GPIO and ADC utility functions to libtock-sync so that examples only need to use libtock-sync for peripheral operations rather than mixing in raw libtock or syscall headers. libtock/peripherals/gpio_types.h (new): Move libtock_gpio_input_mode_t and libtock_gpio_interrupt_mode_t enums out of gpio.h into a shared types header so libtock-sync can include only the types without pulling in the full libtock GPIO API. libtock-sync/peripherals/gpio: Add libtocksync_gpio_enable_input() and libtocksync_gpio_read() for non-blocking GPIO configuration and pin reads. libtock-sync/peripherals/adc: Add libtocksync_adc_channel_count(), libtocksync_adc_reference_voltage(), and libtocksync_adc_resolution_bits() query helpers. examples: Update adc, hail, imix, and microbit_v2 examples to use the new libtock-sync functions instead of mixing in libtock peripheral or syscall headers directly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
430afea to
a4c1108
Compare
a4c1108 to
e52fa93
Compare
brghena
requested changes
Apr 22, 2026
Contributor
brghena
left a comment
There was a problem hiding this comment.
Pretty mechanical, looks fine overall.
There are some bit manipulations for date and time that are nonsense. I'm sure they're technically correct, but there's a much more human-readable way to do them. I guess the AI is just smarter than I.
Contributor
|
I think you'll manually have to move stuff in from #570 since you moved locations? |
Contributor
Author
Done |
brghena
approved these changes
Apr 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I used claude to convert the libtock-sync/peripherals syscalls to YWF.
I am reviewing all changes now.I have reviewed all changes and tested crc/gpio/rng.