Skip to content

Is there a way to modify only a single bit in the pin change interrupt control register (pcicr) for the atmega328p? #675

@K4LCIFER

Description

@K4LCIFER

To enable the external interrupt for Port C, for example, it would be something like:

let dp = atmega_hal::Peripherals::take().unwrap();
dp.EXINT.pcicr.modify(|_, w| w.pcie().bits(0b010));

but it seems rather silly to need to modify all 3 bits when only 1 bit is desired to be changed. I would think something like:

dp.EXINT.pcicr.modify(|_, w| w.pcie1().set_bit());

but pcie1() doesn't appear to exist.

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