Skip to content

It is not possible to select a different timer for megaavr other than USE_TIMERB2 #144

@vladyslav-arzhanov

Description

@vladyslav-arzhanov

Currently, it is not possible to select a different timer for megaavr other than USE_TIMERB2. Sometimes this is necessary, for example, when several libraries conflict with each other. When I try to define another timer, I get a compilation error:

In file included from /home/user/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/avr/include/avr/io.h:677:0,
                 from /home/user/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/avr/include/avr/pgmspace.h:90,
                 from /home/user/.arduino15/packages/arduino/hardware/megaavr/1.8.8/cores/arduino/api/String.h:31,
                 from /home/user/.arduino15/packages/arduino/hardware/megaavr/1.8.8/cores/arduino/api/IPAddress.h:24,
                 from /home/user/.arduino15/packages/arduino/hardware/megaavr/1.8.8/cores/arduino/api/ArduinoAPI.h:30,
                 from /home/user/.arduino15/packages/arduino/hardware/megaavr/1.8.8/cores/arduino/Arduino.h:23,
                 from /home/user/my_proj/my_proj.ino:1:
/home/user/Arduino/libraries/Servo/src/megaavr/ServoTimers.h:46:2: error: expected ')' before '*' token
 &TCB2;
  ^
/home/user/Arduino/libraries/Servo/src/megaavr/ServoTimers.h:46:2: error: expected ')' before '*' token
/home/user/Arduino/libraries/Servo/src/megaavr/ServoTimers.h:46:2: error: expected constructor, destructor, or type conversion before '*' token
exit status 1

Compilation error: exit status 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: codeRelated to content of the project itselftype: enhancementProposed improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions