diff options
Diffstat (limited to '')
-rw-r--r-- | hal/pin.tpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/hal/pin.tpp b/hal/pin.tpp index 42d03de..527ba0a 100644 --- a/hal/pin.tpp +++ b/hal/pin.tpp @@ -52,6 +52,12 @@ unsigned io_pin<bit>::read() const } template<unsigned bit> +unsigned io_pin<bit>::is_set() const +{ + return (*_latch & (1<<bit)) ? 1 : 0; +} + +template<unsigned bit> void io_pin<bit>::set(unsigned s) { if (s > 0) |