Skip to content

feat(PeriphDrivers)!: Add support for configuring GPIO Drive Strength #673

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

Merged
merged 23 commits into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
18efacd
feat(PeriphDrivers): Add GPIO Drive Strength configuration support
sihyung-maxim Jul 17, 2023
343ef0d
revert spi.h
sihyung-maxim Aug 22, 2023
dbe7010
Merge branch 'main' into feat/gpio_drvstr
sihyung-maxim Aug 22, 2023
706d43a
fix(PeriphDrivers): Fix regression errors
sihyung-maxim Aug 22, 2023
307b5ab
fix(PeriphDrivers): Fix regression errors
sihyung-maxim Aug 22, 2023
913727f
fix(PeriphDrivers): Fix regression errors
sihyung-maxim Aug 22, 2023
eaf3826
Set default value to drive strength 0
sihyung-maxim Aug 22, 2023
7fde9e2
fix(PeriphDrivers): Replace dssel with drvstr
sihyung-maxim Aug 23, 2023
c42e89f
feat(Examples,PeriphDrivers): Set GPIO drive strength for all cfg str…
sihyung-maxim Sep 5, 2023
5e0c0d3
style(PeriphDrivers): Remove clang format for predefined cfg structs
sihyung-maxim Sep 5, 2023
1256443
clang-format bot reformatting.
sihyung-maxim Sep 5, 2023
89f8f58
Revert "clang-format bot reformatting."
sihyung-maxim Sep 5, 2023
7d1524a
style(PeriphDrivers): Fix clang format
sihyung-maxim Sep 5, 2023
22b8b76
style(PeriphDrivers): Fix linter errors
sihyung-maxim Sep 5, 2023
f17dfc4
clang-format bot reformatting.
sihyung-maxim Sep 5, 2023
e1471d1
Trigger actions
sihyung-maxim Sep 5, 2023
5b795aa
fix(PeriphDrivers): Fix build errors
sihyung-maxim Sep 5, 2023
1c5130c
Merge branch 'feat/gpio_drvstr' of github.com:Analog-Devices-MSDK/msd…
sihyung-maxim Sep 5, 2023
aed14f8
style(Examples): Fix linter errors
sihyung-maxim Sep 5, 2023
e4ffed7
style(Examples): Fix linter errors
sihyung-maxim Sep 5, 2023
cec9adb
style(Examples): Fix linter errors
sihyung-maxim Sep 5, 2023
8e093ee
style(Examples): Fix linter errors
sihyung-maxim Sep 5, 2023
b98f0ff
fix(PeriphDrivers): Only set drive strength if not input
sihyung-maxim Sep 8, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Examples/MAX32520/EEPROM_Emulator/include/cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
*
******************************************************************************/

#ifndef EXAMPLES_MAX78000_EEPROM_EMULATOR_CACHE_H_
#define EXAMPLES_MAX78000_EEPROM_EMULATOR_CACHE_H_
#ifndef EXAMPLES_MAX32520_EEPROM_EMULATOR_INCLUDE_CACHE_H_
#define EXAMPLES_MAX32520_EEPROM_EMULATOR_INCLUDE_CACHE_H_

/***** Included Files *****/
#include <stdbool.h>
Expand Down Expand Up @@ -79,4 +79,4 @@ int cache_refresh(cache_t *cache, uint32_t next_addr);
*/
int cache_write_back(cache_t *cache);

#endif // EXAMPLES_MAX78000_EEPROM_EMULATOR_CACHE_H_
#endif // EXAMPLES_MAX32520_EEPROM_EMULATOR_INCLUDE_CACHE_H_
6 changes: 3 additions & 3 deletions Examples/MAX32520/EEPROM_Emulator/include/eeprom.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
*
******************************************************************************/

#ifndef EXAMPLES_MAX78000_EEPROM_EMULATOR_EEPROM_H_
#define EXAMPLES_MAX78000_EEPROM_EMULATOR_EEPROM_H_
#ifndef EXAMPLES_MAX32520_EEPROM_EMULATOR_INCLUDE_EEPROM_H_
#define EXAMPLES_MAX32520_EEPROM_EMULATOR_INCLUDE_EEPROM_H_

/***** Included Files *****/
#include <stdbool.h>
Expand Down Expand Up @@ -80,4 +80,4 @@ int eeprom_init(mxc_i2c_regs_t *eeprom_i2c, mxc_gpio_cfg_t rdy_pin);
*/
void eeprom_prep_for_txn(void);

#endif // EXAMPLES_MAX78000_EEPROM_EMULATOR_EEPROM_H_
#endif // EXAMPLES_MAX32520_EEPROM_EMULATOR_INCLUDE_EEPROM_H_
1 change: 1 addition & 0 deletions Examples/MAX32520/EEPROM_Emulator/src/eeprom.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ int eeprom_init(mxc_i2c_regs_t *eeprom_i2c, mxc_gpio_cfg_t rdy_pin)
eeprom.rdy_pin.func = MXC_GPIO_FUNC_OUT;
eeprom.rdy_pin.pad = MXC_GPIO_PAD_NONE;
eeprom.rdy_pin.vssel = MXC_GPIO_VSSEL_VDDIO;
eeprom.rdy_pin.drvstr = MXC_GPIO_DRVSTR_0;

err = MXC_GPIO_Config(&eeprom.rdy_pin);
if (err != E_NO_ERROR) {
Expand Down
6 changes: 6 additions & 0 deletions Examples/MAX32520/GPIO/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ int main(void)
gpio_interrupt_status.pad = MXC_GPIO_PAD_NONE;
gpio_interrupt_status.func = MXC_GPIO_FUNC_OUT;
gpio_interrupt_status.vssel = MXC_GPIO_VSSEL_VDDIO;
gpio_interrupt_status.drvstr = MXC_GPIO_DRVSTR_0;
MXC_GPIO_Config(&gpio_interrupt_status);

/*
Expand All @@ -96,6 +97,7 @@ int main(void)
gpio_interrupt.pad = MXC_GPIO_PAD_PULL_UP;
gpio_interrupt.func = MXC_GPIO_FUNC_IN;
gpio_interrupt.vssel = MXC_GPIO_VSSEL_VDDIO;
gpio_interrupt.drvstr = MXC_GPIO_DRVSTR_0;
MXC_GPIO_Config(&gpio_interrupt);
MXC_GPIO_RegisterCallback(&gpio_interrupt, gpio_isr, &gpio_interrupt_status);
MXC_GPIO_IntConfig(&gpio_interrupt, MXC_GPIO_INT_FALLING);
Expand All @@ -111,13 +113,17 @@ int main(void)
gpio_in.mask = MXC_GPIO_PIN_IN;
gpio_in.pad = MXC_GPIO_PAD_PULL_UP;
gpio_in.func = MXC_GPIO_FUNC_IN;
gpio_in.vssel = MXC_GPIO_VSSEL_VDDIO;
gpio_in.drvstr = MXC_GPIO_DRVSTR_0;
MXC_GPIO_Config(&gpio_in);

/* Setup output pin. */
gpio_out.port = MXC_GPIO_PORT_OUT;
gpio_out.mask = MXC_GPIO_PIN_OUT;
gpio_out.pad = MXC_GPIO_PAD_NONE;
gpio_out.func = MXC_GPIO_FUNC_OUT;
gpio_out.vssel = MXC_GPIO_VSSEL_VDDIO;
gpio_out.drvstr = MXC_GPIO_DRVSTR_0;
MXC_GPIO_Config(&gpio_out);

while (1) {
Expand Down
1 change: 1 addition & 0 deletions Examples/MAX32520/Library_Generate/gpiolib.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@

#include "mxc_errors.h"
#include "gpio.h"
#include "gpiolib.h"

void gpio_set(const mxc_gpio_cfg_t *gpio)
{
Expand Down
6 changes: 3 additions & 3 deletions Examples/MAX32520/Library_Generate/gpiolib.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
*
******************************************************************************/

#ifndef GPIOLIB_H_
#define GPIOLIB_H_
#ifndef EXAMPLES_MAX32520_LIBRARY_GENERATE_GPIOLIB_H_
#define EXAMPLES_MAX32520_LIBRARY_GENERATE_GPIOLIB_H_

#include "gpio.h"

Expand All @@ -61,4 +61,4 @@ void gpio_clear(const mxc_gpio_cfg_t *gpio);
*/
int gpio_get(const mxc_gpio_cfg_t *gpio);

#endif /* GPIOLIB_H_ */
#endif // EXAMPLES_MAX32520_LIBRARY_GENERATE_GPIOLIB_H_
6 changes: 3 additions & 3 deletions Examples/MAX32520/Library_Use/lib/include/gpiolib.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
*
******************************************************************************/

#ifndef GPIOLIB_H_
#define GPIOLIB_H_
#ifndef EXAMPLES_MAX32520_LIBRARY_USE_LIB_INCLUDE_GPIOLIB_H_
#define EXAMPLES_MAX32520_LIBRARY_USE_LIB_INCLUDE_GPIOLIB_H_

#include "gpio.h"

Expand All @@ -61,4 +61,4 @@ void gpio_clear(const mxc_gpio_cfg_t *gpio);
*/
int gpio_get(const mxc_gpio_cfg_t *gpio);

#endif /* GPIOLIB_H_ */
#endif // EXAMPLES_MAX32520_LIBRARY_USE_LIB_INCLUDE_GPIOLIB_H_
8 changes: 6 additions & 2 deletions Examples/MAX32572/GPIO/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ int main(void)
gpio_interrupt_status.pad = MXC_GPIO_PAD_NONE;
gpio_interrupt_status.func = MXC_GPIO_FUNC_OUT;
gpio_interrupt_status.vssel = MXC_GPIO_VSSEL_VDDIO;
gpio_interrupt_status.drvstr = MXC_GPIO_DRVSTR_0;
MXC_GPIO_Config(&gpio_interrupt_status);

/*
Expand All @@ -95,6 +96,7 @@ int main(void)
gpio_interrupt.pad = MXC_GPIO_PAD_PULL_UP;
gpio_interrupt.func = MXC_GPIO_FUNC_IN;
gpio_interrupt.vssel = MXC_GPIO_VSSEL_VDDIO;
gpio_interrupt.drvstr = MXC_GPIO_DRVSTR_0;
MXC_GPIO_Config(&gpio_interrupt);
MXC_GPIO_RegisterCallback(&gpio_interrupt, gpio_isr, &gpio_interrupt_status);
MXC_GPIO_IntConfig(&gpio_interrupt, MXC_GPIO_INT_FALLING);
Expand All @@ -110,15 +112,17 @@ int main(void)
gpio_in.mask = MXC_GPIO_PIN_IN;
gpio_in.pad = MXC_GPIO_PAD_PULL_UP;
gpio_in.func = MXC_GPIO_FUNC_IN;
gpio_interrupt.vssel = MXC_GPIO_VSSEL_VDDIO;
gpio_in.vssel = MXC_GPIO_VSSEL_VDDIO;
gpio_in.drvstr = MXC_GPIO_DRVSTR_0;
MXC_GPIO_Config(&gpio_in);

/* Setup output pin. */
gpio_out.port = MXC_GPIO_PORT_OUT;
gpio_out.mask = MXC_GPIO_PIN_OUT;
gpio_out.pad = MXC_GPIO_PAD_NONE;
gpio_out.func = MXC_GPIO_FUNC_OUT;
gpio_interrupt.vssel = MXC_GPIO_VSSEL_VDDIO;
gpio_out.vssel = MXC_GPIO_VSSEL_VDDIO;
gpio_out.drvstr = MXC_GPIO_DRVSTR_0;
MXC_GPIO_Config(&gpio_out);

while (1) {
Expand Down
1 change: 1 addition & 0 deletions Examples/MAX32572/Library_Generate/gpiolib.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@

#include "mxc_errors.h"
#include "gpio.h"
#include "gpiolib.h"

void gpio_set(const mxc_gpio_cfg_t *gpio)
{
Expand Down
6 changes: 3 additions & 3 deletions Examples/MAX32572/Library_Generate/gpiolib.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
*
******************************************************************************/

#ifndef GPIOLIB_H_
#define GPIOLIB_H_
#ifndef EXAMPLES_MAX32572_LIBRARY_GENERATE_GPIOLIB_H_
#define EXAMPLES_MAX32572_LIBRARY_GENERATE_GPIOLIB_H_

#include "gpio.h"

Expand All @@ -61,4 +61,4 @@ void gpio_clear(const mxc_gpio_cfg_t *gpio);
*/
int gpio_get(const mxc_gpio_cfg_t *gpio);

#endif /* GPIOLIB_H_ */
#endif // EXAMPLES_MAX32572_LIBRARY_GENERATE_GPIOLIB_H_
6 changes: 3 additions & 3 deletions Examples/MAX32572/Library_Use/lib/include/gpiolib.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
*
******************************************************************************/

#ifndef GPIOLIB_H_
#define GPIOLIB_H_
#ifndef EXAMPLES_MAX32572_LIBRARY_USE_LIB_INCLUDE_GPIOLIB_H_
#define EXAMPLES_MAX32572_LIBRARY_USE_LIB_INCLUDE_GPIOLIB_H_

#include "gpio.h"

Expand All @@ -61,4 +61,4 @@ void gpio_clear(const mxc_gpio_cfg_t *gpio);
*/
int gpio_get(const mxc_gpio_cfg_t *gpio);

#endif /* GPIOLIB_H_ */
#endif /* EXAMPLES_MAX32572_LIBRARY_USE_LIB_INCLUDE_GPIOLIB_H_ */
1 change: 1 addition & 0 deletions Examples/MAX32650/EEPROM_Emulator/src/eeprom.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ int eeprom_init(mxc_i2c_regs_t *eeprom_i2c, mxc_gpio_cfg_t rdy_pin)
eeprom.rdy_pin.func = MXC_GPIO_FUNC_OUT;
eeprom.rdy_pin.pad = MXC_GPIO_PAD_NONE;
eeprom.rdy_pin.vssel = MXC_GPIO_VSSEL_VDDIO;
eeprom.rdy_pin.drvstr = MXC_GPIO_DRVSTR_0;

err = MXC_GPIO_Config(&eeprom.rdy_pin);
if (err != E_NO_ERROR) {
Expand Down
5 changes: 5 additions & 0 deletions Examples/MAX32650/GPIO/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ int main(void)
gpio_interrupt_status.pad = MXC_GPIO_PAD_NONE;
gpio_interrupt_status.func = MXC_GPIO_FUNC_OUT;
gpio_interrupt_status.vssel = MXC_GPIO_VSSEL_VDDIO;
gpio_interrupt_status.drvstr = MXC_GPIO_DRVSTR_0;
MXC_GPIO_Config(&gpio_interrupt_status);

/*
Expand All @@ -128,13 +129,17 @@ int main(void)
gpio_in.mask = MXC_GPIO_PIN_IN;
gpio_in.pad = MXC_GPIO_PAD_WEAK_PULL_UP;
gpio_in.func = MXC_GPIO_FUNC_IN;
gpio_in.vssel = MXC_GPIO_VSSEL_VDDIO;
gpio_in.drvstr = MXC_GPIO_DRVSTR_0;
MXC_GPIO_Config(&gpio_in);

/* Setup output pin. */
gpio_out.port = MXC_GPIO_PORT_OUT;
gpio_out.mask = MXC_GPIO_PIN_OUT;
gpio_out.pad = MXC_GPIO_PAD_NONE;
gpio_out.func = MXC_GPIO_FUNC_OUT;
gpio_out.vssel = MXC_GPIO_VSSEL_VDDIO;
gpio_out.drvstr = MXC_GPIO_DRVSTR_0;
MXC_GPIO_Config(&gpio_out);

while (1) {
Expand Down
1 change: 1 addition & 0 deletions Examples/MAX32650/Library_Generate/gpiolib.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@

#include "mxc_errors.h"
#include "gpio.h"
#include "gpiolib.h"

void gpio_set(const mxc_gpio_cfg_t *gpio)
{
Expand Down
6 changes: 3 additions & 3 deletions Examples/MAX32650/Library_Generate/gpiolib.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
*
******************************************************************************/

#ifndef GPIOLIB_H_
#define GPIOLIB_H_
#ifndef EXAMPLES_MAX32650_LIBRARY_GENERATE_GPIOLIB_H_
#define EXAMPLES_MAX32650_LIBRARY_GENERATE_GPIOLIB_H_

#include "gpio.h"

Expand All @@ -61,4 +61,4 @@ void gpio_clear(const mxc_gpio_cfg_t *gpio);
*/
int gpio_get(const mxc_gpio_cfg_t *gpio);

#endif /* GPIOLIB_H_ */
#endif // EXAMPLES_MAX32650_LIBRARY_GENERATE_GPIOLIB_H_
6 changes: 3 additions & 3 deletions Examples/MAX32650/Library_Use/lib/include/gpiolib.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
*
******************************************************************************/

#ifndef GPIOLIB_H_
#define GPIOLIB_H_
#ifndef EXAMPLES_MAX32650_LIBRARY_USE_LIB_INCLUDE_GPIOLIB_H_
#define EXAMPLES_MAX32650_LIBRARY_USE_LIB_INCLUDE_GPIOLIB_H_

#include "gpio.h"

Expand All @@ -61,4 +61,4 @@ void gpio_clear(const mxc_gpio_cfg_t *gpio);
*/
int gpio_get(const mxc_gpio_cfg_t *gpio);

#endif /* GPIOLIB_H_ */
#endif // EXAMPLES_MAX32650_LIBRARY_USE_LIB_INCLUDE_GPIOLIB_H_
1 change: 1 addition & 0 deletions Examples/MAX32655/EEPROM_Emulator/src/eeprom.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ int eeprom_init(mxc_i2c_regs_t *eeprom_i2c, mxc_gpio_cfg_t rdy_pin)
eeprom.rdy_pin.func = MXC_GPIO_FUNC_OUT;
eeprom.rdy_pin.pad = MXC_GPIO_PAD_NONE;
eeprom.rdy_pin.vssel = MXC_GPIO_VSSEL_VDDIO;
eeprom.rdy_pin.drvstr = MXC_GPIO_DRVSTR_0;

err = MXC_GPIO_Config(&eeprom.rdy_pin);
if (err != E_NO_ERROR) {
Expand Down
6 changes: 5 additions & 1 deletion Examples/MAX32655/GPIO/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ int main(void)
gpio_interrupt_status.pad = MXC_GPIO_PAD_NONE;
gpio_interrupt_status.func = MXC_GPIO_FUNC_OUT;
gpio_interrupt_status.vssel = MXC_GPIO_VSSEL_VDDIOH;
gpio_interrupt_status.drvstr = MXC_GPIO_DRVSTR_0;
MXC_GPIO_Config(&gpio_interrupt_status);

/*
Expand All @@ -123,6 +124,7 @@ int main(void)
gpio_interrupt.pad = MXC_GPIO_PAD_PULL_UP;
gpio_interrupt.func = MXC_GPIO_FUNC_IN;
gpio_interrupt.vssel = MXC_GPIO_VSSEL_VDDIO;
gpio_interrupt.drvstr = MXC_GPIO_DRVSTR_0;
MXC_GPIO_Config(&gpio_interrupt);
MXC_GPIO_RegisterCallback(&gpio_interrupt, gpio_isr, &gpio_interrupt_status);
MXC_GPIO_IntConfig(&gpio_interrupt, MXC_GPIO_INT_FALLING);
Expand All @@ -139,14 +141,16 @@ int main(void)
gpio_in.pad = MXC_GPIO_PAD_PULL_UP;
gpio_in.func = MXC_GPIO_FUNC_IN;
gpio_in.vssel = MXC_GPIO_VSSEL_VDDIO;
gpio_in.drvstr = MXC_GPIO_DRVSTR_0;
MXC_GPIO_Config(&gpio_in);

/* Setup output pin. */
gpio_out.port = MXC_GPIO_PORT_OUT;
gpio_out.mask = MXC_GPIO_PIN_OUT;
gpio_out.pad = MXC_GPIO_PAD_NONE;
gpio_out.func = MXC_GPIO_FUNC_OUT;
gpio_out.vssel = MXC_GPIO_VSSEL_VDDIOH;
gpio_out.vssel = MXC_GPIO_VSSEL_VDDIO;
gpio_out.drvstr = MXC_GPIO_DRVSTR_0;
MXC_GPIO_Config(&gpio_out);

while (1) {
Expand Down
1 change: 1 addition & 0 deletions Examples/MAX32655/Library_Generate/gpiolib.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@

#include "mxc_errors.h"
#include "gpio.h"
#include "gpiolib.h"

void gpio_set(const mxc_gpio_cfg_t *gpio)
{
Expand Down
6 changes: 3 additions & 3 deletions Examples/MAX32655/Library_Generate/gpiolib.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
*
******************************************************************************/

#ifndef GPIOLIB_H_
#define GPIOLIB_H_
#ifndef EXAMPLES_MAX32655_LIBRARY_GENERATE_GPIOLIB_H_
#define EXAMPLES_MAX32655_LIBRARY_GENERATE_GPIOLIB_H_

#include "gpio.h"

Expand All @@ -61,4 +61,4 @@ void gpio_clear(const mxc_gpio_cfg_t *gpio);
*/
int gpio_get(const mxc_gpio_cfg_t *gpio);

#endif /* GPIOLIB_H_ */
#endif // EXAMPLES_MAX32655_LIBRARY_GENERATE_GPIOLIB_H_
6 changes: 3 additions & 3 deletions Examples/MAX32655/Library_Use/lib/include/gpiolib.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
*
******************************************************************************/

#ifndef GPIOLIB_H_
#define GPIOLIB_H_
#ifndef EXAMPLES_MAX32655_LIBRARY_USE_LIB_INCLUDE_GPIOLIB_H_
#define EXAMPLES_MAX32655_LIBRARY_USE_LIB_INCLUDE_GPIOLIB_H_

#include "gpio.h"

Expand All @@ -61,4 +61,4 @@ void gpio_clear(const mxc_gpio_cfg_t *gpio);
*/
int gpio_get(const mxc_gpio_cfg_t *gpio);

#endif /* GPIOLIB_H_ */
#endif // EXAMPLES_MAX32655_LIBRARY_USE_LIB_INCLUDE_GPIOLIB_H_
1 change: 1 addition & 0 deletions Examples/MAX32660/EEPROM_Emulator/src/eeprom.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ int eeprom_init(mxc_i2c_regs_t *eeprom_i2c, mxc_gpio_cfg_t rdy_pin)
eeprom.rdy_pin.func = MXC_GPIO_FUNC_OUT;
eeprom.rdy_pin.pad = MXC_GPIO_PAD_NONE;
eeprom.rdy_pin.vssel = MXC_GPIO_VSSEL_VDDIOH;
eeprom.rdy_pin.drvstr = MXC_GPIO_DRVSTR_0;

err = MXC_GPIO_Config(&eeprom.rdy_pin);
if (err != E_NO_ERROR) {
Expand Down
6 changes: 6 additions & 0 deletions Examples/MAX32660/GPIO/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ int main(void)
gpio_interrupt_status.pad = MXC_GPIO_PAD_NONE;
gpio_interrupt_status.func = MXC_GPIO_FUNC_OUT;
gpio_interrupt_status.vssel = MXC_GPIO_VSSEL_VDDIO;
gpio_interrupt_status.drvstr = MXC_GPIO_DRVSTR_0;
MXC_GPIO_Config(&gpio_interrupt_status);

/*
Expand All @@ -116,6 +117,7 @@ int main(void)
gpio_interrupt.pad = MXC_GPIO_PAD_PULL_UP;
gpio_interrupt.func = MXC_GPIO_FUNC_IN;
gpio_interrupt.vssel = MXC_GPIO_VSSEL_VDDIOH;
gpio_interrupt.drvstr = MXC_GPIO_DRVSTR_0;
MXC_GPIO_Config(&gpio_interrupt);
MXC_GPIO_RegisterCallback(&gpio_interrupt, gpio_isr, &gpio_interrupt_status);
MXC_GPIO_IntConfig(&gpio_interrupt, MXC_GPIO_INT_FALLING);
Expand All @@ -138,13 +140,17 @@ int main(void)
gpio_in.mask = BUTTON_PIN;
gpio_in.pad = MXC_GPIO_PAD_PULL_UP;
gpio_in.func = MXC_GPIO_FUNC_IN;
gpio_in.vssel = MXC_GPIO_VSSEL_VDDIO;
gpio_in.drvstr = MXC_GPIO_DRVSTR_0;
MXC_GPIO_Config(&gpio_in);

/* Setup output pin. */
gpio_out.port = LED_PORT;
gpio_out.mask = LED_PIN;
gpio_out.pad = MXC_GPIO_PAD_NONE;
gpio_out.func = MXC_GPIO_FUNC_OUT;
gpio_out.vssel = MXC_GPIO_VSSEL_VDDIO;
gpio_out.drvstr = MXC_GPIO_DRVSTR_0;
MXC_GPIO_Config(&gpio_out);

while (1) {
Expand Down
Loading