Skip to content

<drivers/pin.h> needed in each module's file.  #172

@majianjia

Description

@majianjia

After excluded #include <at_socket.h> as mentioned in #171

Failed to compile with codes that related to pin driver.
For example:

rt_pin_mode(sim800c->power_pin, PIN_MODE_OUTPUT);

will post errors and warnings that cannot find these functions and macros.

By adding #include <drivers/pin.h> solve this problem.
Should you consider adding the pin header for all classes.

But this is now a dependency of the pin driver. Should this be added to the Kconfig?

If we don't want the dependency, should it provide an interface or a function pointer for users to customize their own power on/power off method? Because sometimes, people are not using a native pin to control the power instead using an I2C IO expansion chip.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions