Skip to content

Does not support binary or hex values #30

Closed
@dannystaple

Description

@dannystaple

In principle, the RP2040 datasheet section 3.3.2 suggests that a value can be expressed as a binary value, eg:
0b10101.

In practice this causes an exception:

lib/adafruit_pioasm.py", line 182, in assemble
    value = int(instruction[-1])
ValueError: invalid literal for int() with base 10: '0b10101'

this also applies to hex values.
ValueError: invalid literal for int() with base 10: '0x1a'

This may be simply a note to put under https://learn.adafruit.com/intro-to-rp2040-pio-with-circuitpython (which thinking about it, I should link to from the docs for this module).

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