Skip to content

Names "is_high", "is_low" is confusing. #71

Closed
@janderholm

Description

@janderholm

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions