Skip to content

Utility Timer native functions #476

Open
@gfwilliams

Description

@gfwilliams

The utility timer (used for digitalPulse and Waveform) has been able to do PWM for a while, but it's never been exposed.

For this, I'd like to sort out the contents of jstimer.c - perhaps giving each timer a unique ID, and having one set of functions to access them (currently we have one set for digitalPulse, another for Waveform).

We could then execute native functions on timer IRQs. This would be massively useful for stuff like scanning out displays. You can hack it up on 1v72 by executing code on an IRQ using setWatch, and then physically joining the pin you're watching to a PWM pin - but it's not ideal.

Currently we can't create JsVars from within an IRQ while still remaining stable, so sadly this isn't as useful as it could be. Once that gets fixed it'd be great though.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions