From cf81c5ab0285d7bfd742f28c611bde8f3bd3ce52 Mon Sep 17 00:00:00 2001 From: soypat Date: Tue, 8 Apr 2025 17:08:08 -0300 Subject: [PATCH] add PinInput and PinOutput HAL --- pins.go | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 pins.go diff --git a/pins.go b/pins.go new file mode 100644 index 0000000..a7662cb --- /dev/null +++ b/pins.go @@ -0,0 +1,9 @@ +package drivers + +// 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)