Skip to content

Conversation

ppannuto
Copy link
Member

@ppannuto ppannuto commented Aug 8, 2025

Compile-tested only, fairly straight conversion.

There's a mild deviation from the style guide with the wait_for_generic_command instead of 6 different wait_for_[set|clear|...] methods. It mirrors how the driver itself is implemented, and I think is a cleaner design and easier to follow than lots of redundant syscall methods.

More generally, I suspect as we port more of these we may find it makes sense to rethink the guidance around ywf methods, but I'm not a that level of confident with just this one.

@@ -0,0 +1,20 @@
#pragma once

#include <libtock/peripherals/syscalls/gpio_async_syscalls.h>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
#include <libtock/peripherals/syscalls/gpio_async_syscalls.h>

So we don't leak libtock in libtock-sync.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's there to avoid duplicating the DRIVER_NUM_GPIO_ASYNC, presumably for the same reason you have the same include here ( https://github.com/tock/libtock-c/pull/553/files#diff-28af97b25b50c3d619c7a3ba099e6a2ff6ebcf972c1fc84800fa932c3c1159d7R3 ) and elsewhere in #553.

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