-
Notifications
You must be signed in to change notification settings - Fork 93
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
fix(PeriphDrivers): Update MAX32662 GPIO PAD configuration #874
Conversation
This PR is related to this one: #866 The final changes should be consistent across these two PRs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To maintain consistency, I think we should also apply the approach in #866.
In this case, since weak pull-ups are only supported, the enum can be defined as:
/**
* @brief Enumeration type for the type of GPIO pad on a given pin.
*/
typedef enum {
MXC_GPIO_PAD_NONE, ///< No pull-up or pull-down
MXC_GPIO_PAD_WEAK_PULL_UP, ///< Set pad to weak pull-up
MXC_GPIO_PAD_WEAK_PULL_DOWN, ///< Set pad to weak pull-down
MXC_GPIO_PAD_PULL_UP = MXC_GPIO_PAD_WEAK_PULL_UP, ///< Not supported by hardware. This sets a weak pull-up instead.
MXC_GPIO_PAD_PULL_DOWN = MXC_GPIO_PAD_WEAK_PULL_DOWN, ///< Not supported by hardware. This sets a weak pull-down instead.
} mxc_gpio_pad_t;
@sihyung-maxim correct the changes shall be consistent. Default pullup pulldown shall be "MXC_GPIO_PAD_PULL_UP" and "MXC_GPIO_PAD_PULL_DOWN" to be consistent and simplify things. The below configuration will work on Zephyr side. gpio.h file
gpio_me12.c file
|
ME12 only supports weak pull-up and weak pull-down. Updated PAD configuration. Signed-off-by: Furkan Akkiz <[email protected]>
cf694ae
to
7b77698
Compare
Updated code as this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my mind it makes more sense to define the weak pull-ups as the main ones, but if this helps simplify the Zephyr port then this works too
Pull Request Template
Description
ME12 only supports high-impedance, weak pullup and weak pulldown options.
This commit removes other options and corrects related register values of PAD configuration.
Checklist Before Requesting Review