Skip to content

some bug about pins_arduino.h #1

@wasdpkj

Description

@wasdpkj

这里有一些bug,会导致digitalRead()函数不正常:
const uint16_t PROGMEM port_to_input_PGM[] = {
NOT_A_PIN,
NOT_A_PIN,
NOT_A_PIN,
(uint16_t)&PINC,
(uint16_t)&PIND,
(uint16_t)&PINE,
(uint16_t)&PINF,
(uint16_t)&PING,
NOT_A_PIN,
NOT_A_PIN,
NOT_A_PIN,
NOT_A_PIN,
NOT_A_PIN,
};

应该改为:
const uint16_t PROGMEM port_to_input_PGM[] = {
NOT_A_PIN,
NOT_A_PIN,
(uint16_t)&PINB,
NOT_A_PIN,
(uint16_t)&PIND,
(uint16_t)&PINE,
(uint16_t)&PINF,
(uint16_t)&PING,
NOT_A_PIN,
NOT_A_PIN,
NOT_A_PIN,
NOT_A_PIN,
NOT_A_PIN,
};

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