Skip to content

Request instructionCounter in GodmodeState #160

@jgfoster

Description

@jgfoster

Sometimes we need to test not just the value of pins but the order in which they are set. For example, many devices (such as LiquidCrystal) have a "clock" pin that is used to inform the device that the other pins have now been populated with useful values (see LiquidCrystal.cpp:303).

At first it seems that this could be done by incrementing the microsecond clock with each instruction but this is unrealistic (it implies a 1MHz machine) and makes some other tests less practical (it is nice that Blink can test for exactly microseconds for a delay() call).

My suggestion is that each event also have an instruction counter so we could determine what pin values were set before the clock pulse. Or is there something that does this that I'm missing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    arduino mocksCompilation mocks for the Arduino libraryduplicateThis issue or pull request already existsenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions