Skip to content

Make SERCOM(0,1)_Handler optional #631

Description

@maxlem

Hello,

In file variant.cpp, two handlers are defined

void SERCOM0_Handler(){  Serial1.IrqHandler();}
void SERCOM5_Handler(){  Serial.IrqHandler();}

I understand it simplify the life of many, e.g. but in my case, I use SERCOM5 as an SPI device and I have to comment out that ISR definition.

What I propose is to make this optional by adding define condition

#if !defined(_VARIANT_ARDUINO_ZERO_DISABLE_SERCOM_HANDLERS_)
void SERCOM0_Handler(){  Serial1.IrqHandler();}
void SERCOM5_Handler(){  Serial.IrqHandler();}
#endif

if it make sense, I will send a PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions