Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
majianjia opened this issue Jan 20, 2022 · 0 comments
Open

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

majianjia opened this issue Jan 20, 2022 · 0 comments

Comments

@majianjia
Copy link
Contributor

majianjia commented Jan 20, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant