Skip to content

Add PinInput and PinOutput HAL #753

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: release
Choose a base branch
from
Open

Add PinInput and PinOutput HAL #753

wants to merge 1 commit into from

Conversation

soypat
Copy link
Contributor

@soypat soypat commented Apr 8, 2025

machine.Pin is not compileable by upstream go. To promote development of drivers which are usable by upstream Go I propose we add the following API.

// PinInput is hardware abstraction for a pin which receives a
// digital signal and reads it (high or low voltage).
type PinInput func() (level bool)

// PinOutput is hardware abstraction for a pin which outputs a
// digital signal (high or low voltage).
type PinOutput func(level bool)

@deadprogram
Copy link
Member

What about #749 ?

@soypat
Copy link
Contributor Author

soypat commented Apr 8, 2025

I missed that @deadprogram. Will comment

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants