Closed
Description
The function names for at InputPin
and OutputPin
(is_high
, is_low
) can be a bit confusing for MCUs with inverting logic. At least some (I would imagine most?) NXP LPC microcontrollers have a register for inverting the value of the GPIO register. If the invert bit is set, a high voltage at the pin will result in a 0 in the register. The name is_low
suggests the voltage is low.
I don't know if there's a better name though. is_active
?
See for example page 76 in the User Manual for the LPC81x series
Metadata
Metadata
Assignees
Labels
No labels