Skip to content

Does not compile for RP2040 (SREG was not declared) #7

@RenaKunisaki

Description

@RenaKunisaki
Arduino: 1.8.19 (Linux), Board: "Raspberry Pi Pico, 2MB (no FS), 120 MHz, Small (-Os) (standard), Disabled, Disabled, Disabled, Disabled, Disabled, None, Adafruit TinyUSB, IPv4 Only, Default (UF2)"

In file included from /home/rena/projects/micros/arduino/ToneGen/ToneGen.ino:4:
/home/rena/Arduino/libraries/BasicEncoder/BasicEncoder.h: In member function 'int8_t BasicEncoder::get_change()':
/home/rena/Arduino/libraries/BasicEncoder/BasicEncoder.h:91:20: error: 'SREG' was not declared in this scope
   91 |     uint8_t sreg = SREG;  // save the current interrupt enable flag
      |                    ^~~~
/home/rena/Arduino/libraries/BasicEncoder/BasicEncoder.h: In member function 'int BasicEncoder::get_count()':
/home/rena/Arduino/libraries/BasicEncoder/BasicEncoder.h:114:20: error: 'SREG' was not declared in this scope
  114 |     uint8_t sreg = SREG;  // save the current interrupt enable flag
      |                    ^~~~
/home/rena/Arduino/libraries/BasicEncoder/BasicEncoder.h: In member function 'void BasicEncoder::reset()':
/home/rena/Arduino/libraries/BasicEncoder/BasicEncoder.h:122:20: error: 'SREG' was not declared in this scope
  122 |     uint8_t sreg = SREG;  // save the current interrupt enable flag
      |                    ^~~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions