Skip to content

Commit

Permalink
feat(PeriphDrivers): Add drive strength configu to GPIO
Browse files Browse the repository at this point in the history
  • Loading branch information
sihyung-maxim committed Jul 12, 2023
1 parent ec65ba6 commit d721f18
Show file tree
Hide file tree
Showing 31 changed files with 348 additions and 10 deletions.
20 changes: 20 additions & 0 deletions Libraries/PeriphDrivers/Include/MAX32520/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,16 @@ typedef enum {
MXC_GPIO_VSSEL_VDDIOH, ///< Set pin to VIDDIOH voltage
} mxc_gpio_vssel_t;

/**
* @brief Enumeration type for drive strength on a given pin.
*/
typedef enum {
MXC_GPIO_DRVSTR_0, ///< Drive Strength 0
MXC_GPIO_DRVSTR_1, ///< Drive Strength 1
MXC_GPIO_DRVSTR_2, ///< Drive Strength 2
MXC_GPIO_DRVSTR_3, ///< Drive Strength 3
} mxc_gpio_drvstr_t;

/**
* @brief Enumeration type for the type of GPIO pad on a given pin.
*/
Expand All @@ -157,6 +167,7 @@ typedef struct {
mxc_gpio_func_t func; ///< Function type
mxc_gpio_pad_t pad; ///< Pad type
mxc_gpio_vssel_t vssel; ///< Voltage select
mxc_gpio_drvstr_t dssel; ///< Drive Strength select
} mxc_gpio_cfg_t;

/**
Expand Down Expand Up @@ -352,6 +363,15 @@ void MXC_GPIO_ClearWakeEn(mxc_gpio_regs_t *port, uint32_t mask);
*/
uint32_t MXC_GPIO_GetWakeEn(mxc_gpio_regs_t *port);

/**
* @brief Set Drive Strength for pins.
*
* @param port The GPIO port.
* @param[in] ds Drive strength level. Ref /mxc_gpio_ds_t enum type.
* @param[in] mask Pins in the GPIO port that will be set to the voltage.
*/
int MXC_GPIO_SetDriveStrength(mxc_gpio_regs_t *port, mxc_gpio_ds_t ds, uint32_t mask);

/**@} end of group gpio */

#ifdef __cplusplus
Expand Down
20 changes: 20 additions & 0 deletions Libraries/PeriphDrivers/Include/MAX32570/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,16 @@ typedef enum {
MXC_GPIO_VSSEL_VDDIOH, ///< Set pin to VIDDIOH voltage
} mxc_gpio_vssel_t;

/**
* @brief Enumeration type for drive strength on a given pin.
*/
typedef enum {
MXC_GPIO_DRVSTR_0, ///< Drive Strength 0
MXC_GPIO_DRVSTR_1, ///< Drive Strength 1
MXC_GPIO_DRVSTR_2, ///< Drive Strength 2
MXC_GPIO_DRVSTR_3, ///< Drive Strength 3
} mxc_gpio_drvstr_t;

/**
* @brief Enumeration type for the type of GPIO pad on a given pin.
*/
Expand All @@ -157,6 +167,7 @@ typedef struct {
mxc_gpio_func_t func; ///< Function type
mxc_gpio_pad_t pad; ///< Pad type
mxc_gpio_vssel_t vssel; ///< Voltage select
mxc_gpio_drvstr_t dssel; ///< Drive Strength select
} mxc_gpio_cfg_t;

/**
Expand Down Expand Up @@ -352,6 +363,15 @@ void MXC_GPIO_ClearWakeEn(mxc_gpio_regs_t *port, uint32_t mask);
*/
uint32_t MXC_GPIO_GetWakeEn(mxc_gpio_regs_t *port);

/**
* @brief Set Drive Strength for pins.
*
* @param port The GPIO port.
* @param[in] ds Drive strength level. Ref /mxc_gpio_ds_t enum type.
* @param[in] mask Pins in the GPIO port that will be set to the voltage.
*/
int MXC_GPIO_SetDriveStrength(mxc_gpio_regs_t *port, mxc_gpio_ds_t ds, uint32_t mask);

/**@} end of group gpio */

#ifdef __cplusplus
Expand Down
20 changes: 20 additions & 0 deletions Libraries/PeriphDrivers/Include/MAX32572/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,16 @@ typedef enum {
MXC_GPIO_VSSEL_VDDIOH, ///< Set pin to VIDDIOH voltage
} mxc_gpio_vssel_t;

/**
* @brief Enumeration type for drive strength on a given pin.
*/
typedef enum {
MXC_GPIO_DRVSTR_0, ///< Drive Strength 0
MXC_GPIO_DRVSTR_1, ///< Drive Strength 1
MXC_GPIO_DRVSTR_2, ///< Drive Strength 2
MXC_GPIO_DRVSTR_3, ///< Drive Strength 3
} mxc_gpio_drvstr_t;

/**
* @brief Enumeration type for the type of GPIO pad on a given pin.
*/
Expand All @@ -158,6 +168,7 @@ typedef struct {
mxc_gpio_func_t func; ///< Function type
mxc_gpio_pad_t pad; ///< Pad type
mxc_gpio_vssel_t vssel; ///< Voltage select
mxc_gpio_drvstr_t dssel; ///< Drive Strength select
} mxc_gpio_cfg_t;

/**
Expand Down Expand Up @@ -353,6 +364,15 @@ void MXC_GPIO_ClearWakeEn(mxc_gpio_regs_t *port, uint32_t mask);
*/
uint32_t MXC_GPIO_GetWakeEn(mxc_gpio_regs_t *port);

/**
* @brief Set Drive Strength for pins.
*
* @param port The GPIO port.
* @param[in] ds Drive strength level. Ref /mxc_gpio_ds_t enum type.
* @param[in] mask Pins in the GPIO port that will be set to the voltage.
*/
int MXC_GPIO_SetDriveStrength(mxc_gpio_regs_t *port, mxc_gpio_ds_t ds, uint32_t mask);

/**@} end of group gpio */

#ifdef __cplusplus
Expand Down
10 changes: 10 additions & 0 deletions Libraries/PeriphDrivers/Include/MAX32650/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ typedef struct {
mxc_gpio_func_t func; /**< Function type */
mxc_gpio_pad_t pad; /**< Pad type */
mxc_gpio_vssel_t vssel; /**< Voltage select */
mxc_gpio_drvstr_t dssel; /**< Drive Strength select */
} mxc_gpio_cfg_t;

/**
Expand Down Expand Up @@ -346,6 +347,15 @@ void MXC_GPIO_ClearWakeEn(mxc_gpio_regs_t *port, uint32_t mask);
*/
uint32_t MXC_GPIO_GetWakeEn(mxc_gpio_regs_t *port);

/**
* @brief Set Drive Strength for pins.
*
* @param port The GPIO port.
* @param[in] ds Drive strength level. Ref /mxc_gpio_ds_t enum type.
* @param[in] mask Pins in the GPIO port that will be set to the voltage.
*/
int MXC_GPIO_SetDriveStrength(mxc_gpio_regs_t *port, mxc_gpio_ds_t ds, uint32_t mask);

/**@} end of group gpio */

#ifdef __cplusplus
Expand Down
20 changes: 20 additions & 0 deletions Libraries/PeriphDrivers/Include/MAX32655/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,16 @@ typedef enum {
MXC_GPIO_VSSEL_VDDIOH, /**< Set pin to VIDDIOH voltage */
} mxc_gpio_vssel_t;

/**
* @brief Enumeration type for drive strength on a given pin.
*/
typedef enum {
MXC_GPIO_DRVSTR_0, /**< Drive Strength 0 */
MXC_GPIO_DRVSTR_1, /**< Drive Strength 1 */
MXC_GPIO_DRVSTR_2, /**< Drive Strength 2 */
MXC_GPIO_DRVSTR_3, /**< Drive Strength 3 */
} mxc_gpio_drvstr_t;

/**
* @brief Enumeration type for the type of GPIO pad on a given pin.
*/
Expand All @@ -157,6 +167,7 @@ typedef struct {
mxc_gpio_func_t func; /**< Function type */
mxc_gpio_pad_t pad; /**< Pad type */
mxc_gpio_vssel_t vssel; /**< Voltage select */
mxc_gpio_drvstr_t dssel; /**< Drive Strength select */
} mxc_gpio_cfg_t;

/**
Expand Down Expand Up @@ -348,6 +359,15 @@ void MXC_GPIO_ClearWakeEn(mxc_gpio_regs_t *port, uint32_t mask);
*/
uint32_t MXC_GPIO_GetWakeEn(mxc_gpio_regs_t *port);

/**
* @brief Set Drive Strength for pins.
*
* @param port The GPIO port.
* @param[in] ds Drive strength level. Ref /mxc_gpio_ds_t enum type.
* @param[in] mask Pins in the GPIO port that will be set to the voltage.
*/
int MXC_GPIO_SetDriveStrength(mxc_gpio_regs_t *port, mxc_gpio_ds_t ds, uint32_t mask);

/**@} end of group gpio */

#ifdef __cplusplus
Expand Down
20 changes: 20 additions & 0 deletions Libraries/PeriphDrivers/Include/MAX32660/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,16 @@ typedef enum {
MXC_GPIO_VSSEL_VDDIOH, ///< Set pin to VIDDIOH voltage
} mxc_gpio_vssel_t;

/**
* @brief Enumeration type for drive strength on a given pin.
*/
typedef enum {
MXC_GPIO_DRVSTR_0, ///< Drive Strength 0
MXC_GPIO_DRVSTR_1, ///< Drive Strength 1
MXC_GPIO_DRVSTR_2, ///< Drive Strength 2
MXC_GPIO_DRVSTR_3, ///< Drive Strength 3
} mxc_gpio_drvstr_t;

/**
* @brief Enumeration type for the type of GPIO pad on a given pin.
*/
Expand All @@ -134,6 +144,7 @@ typedef struct {
mxc_gpio_func_t func; ///< Function type
mxc_gpio_pad_t pad; ///< Pad type
mxc_gpio_vssel_t vssel; ///< Voltage select
mxc_gpio_drvstr_t dssel; ///< Drive Strength select
} mxc_gpio_cfg_t;

/**
Expand Down Expand Up @@ -327,6 +338,15 @@ void MXC_GPIO_ClearWakeEn(mxc_gpio_regs_t *port, uint32_t mask);
*/
uint32_t MXC_GPIO_GetWakeEn(mxc_gpio_regs_t *port);

/**
* @brief Set Drive Strength for pins.
*
* @param port The GPIO port.
* @param[in] ds Drive strength level. Ref /mxc_gpio_ds_t enum type.
* @param[in] mask Pins in the GPIO port that will be set to the voltage.
*/
int MXC_GPIO_SetDriveStrength(mxc_gpio_regs_t *port, mxc_gpio_ds_t ds, uint32_t mask);

/**@} end of group gpio */

#ifdef __cplusplus
Expand Down
20 changes: 20 additions & 0 deletions Libraries/PeriphDrivers/Include/MAX32662/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,16 @@ typedef enum {
MXC_GPIO_VSSEL_VDDIOH, /**< Set pin to VIDDIOH voltage */
} mxc_gpio_vssel_t;

/**
* @brief Enumeration type for drive strength on a given pin.
*/
typedef enum {
MXC_GPIO_DRVSTR_0, /**< Drive Strength 0 */
MXC_GPIO_DRVSTR_1, /**< Drive Strength 1 */
MXC_GPIO_DRVSTR_2, /**< Drive Strength 2 */
MXC_GPIO_DRVSTR_3, /**< Drive Strength 3 */
} mxc_gpio_drvstr_t;

/**
* @brief Enumeration type for the type of GPIO pad on a given pin.
*/
Expand All @@ -156,6 +166,7 @@ typedef struct {
mxc_gpio_func_t func; /**< Function type */
mxc_gpio_pad_t pad; /**< Pad type */
mxc_gpio_vssel_t vssel; /**< Voltage select */
mxc_gpio_drvstr_t dssel; /**< Drive Strength select */
} mxc_gpio_cfg_t;

/**
Expand Down Expand Up @@ -347,6 +358,15 @@ void MXC_GPIO_ClearWakeEn(mxc_gpio_regs_t *port, uint32_t mask);
*/
uint32_t MXC_GPIO_GetWakeEn(mxc_gpio_regs_t *port);

/**
* @brief Set Drive Strength for pins.
*
* @param port The GPIO port.
* @param[in] ds Drive strength level. Ref /mxc_gpio_ds_t enum type.
* @param[in] mask Pins in the GPIO port that will be set to the voltage.
*/
int MXC_GPIO_SetDriveStrength(mxc_gpio_regs_t *port, mxc_gpio_ds_t ds, uint32_t mask);

/**@} end of group gpio */

#ifdef __cplusplus
Expand Down
10 changes: 10 additions & 0 deletions Libraries/PeriphDrivers/Include/MAX32665/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ typedef struct {
mxc_gpio_func_t func; /**< Function type */
mxc_gpio_pad_t pad; /**< Pad type */
mxc_gpio_vssel_t vssel; /**< Voltage select */
mxc_gpio_drvstr_t dssel; /**< Drive Strength select */
} mxc_gpio_cfg_t;

/**
Expand Down Expand Up @@ -351,6 +352,15 @@ void MXC_GPIO_ClearWakeEn(mxc_gpio_regs_t *port, uint32_t mask);
*/
uint32_t MXC_GPIO_GetWakeEn(mxc_gpio_regs_t *port);

/**
* @brief Set Drive Strength for pins.
*
* @param port The GPIO port.
* @param[in] ds Drive strength level. Ref /mxc_gpio_ds_t enum type.
* @param[in] mask Pins in the GPIO port that will be set to the voltage.
*/
int MXC_GPIO_SetDriveStrength(mxc_gpio_regs_t *port, mxc_gpio_ds_t ds, uint32_t mask);

/**@} end of group gpio */

#ifdef __cplusplus
Expand Down
20 changes: 20 additions & 0 deletions Libraries/PeriphDrivers/Include/MAX32670/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,16 @@ typedef enum {
MXC_GPIO_VSSEL_VDDIOH, ///< Set pin to VIDDIOH voltage
} mxc_gpio_vssel_t;

/**
* @brief Enumeration type for drive strength on a given pin.
*/
typedef enum {
MXC_GPIO_DRVSTR_0, ///< Drive Strength 0
MXC_GPIO_DRVSTR_1, ///< Drive Strength 1
MXC_GPIO_DRVSTR_2, ///< Drive Strength 2
MXC_GPIO_DRVSTR_3, ///< Drive Strength 3
} mxc_gpio_drvstr_t;

/**
* @brief Enumeration type for the type of GPIO pad on a given pin.
*/
Expand All @@ -155,6 +165,7 @@ typedef struct {
mxc_gpio_func_t func; ///< Function type
mxc_gpio_pad_t pad; ///< Pad type
mxc_gpio_vssel_t vssel; ///< Voltage select
mxc_gpio_drvstr_t dssel; ///< Drive Strength select
} mxc_gpio_cfg_t;

/**
Expand Down Expand Up @@ -348,6 +359,15 @@ void MXC_GPIO_ClearWakeEn(mxc_gpio_regs_t *port, uint32_t mask);
*/
uint32_t MXC_GPIO_GetWakeEn(mxc_gpio_regs_t *port);

/**
* @brief Set Drive Strength for pins.
*
* @param port The GPIO port.
* @param[in] ds Drive strength level. Ref /mxc_gpio_ds_t enum type.
* @param[in] mask Pins in the GPIO port that will be set to the voltage.
*/
int MXC_GPIO_SetDriveStrength(mxc_gpio_regs_t *port, mxc_gpio_ds_t ds, uint32_t mask);

/**@} end of group gpio */

#ifdef __cplusplus
Expand Down
20 changes: 20 additions & 0 deletions Libraries/PeriphDrivers/Include/MAX32672/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,16 @@ typedef enum {
MXC_GPIO_VSSEL_VDDIOH, ///< Set pin to VIDDIOH voltage
} mxc_gpio_vssel_t;

/**
* @brief Enumeration type for drive strength on a given pin.
*/
typedef enum {
MXC_GPIO_DRVSTR_0, ///< Drive Strength 0
MXC_GPIO_DRVSTR_1, ///< Drive Strength 1
MXC_GPIO_DRVSTR_2, ///< Drive Strength 2
MXC_GPIO_DRVSTR_3, ///< Drive Strength 3
} mxc_gpio_drvstr_t;

/**
* @brief Enumeration type for the type of GPIO pad on a given pin.
*/
Expand All @@ -157,6 +167,7 @@ typedef struct {
mxc_gpio_func_t func; ///< Function type
mxc_gpio_pad_t pad; ///< Pad type
mxc_gpio_vssel_t vssel; ///< Voltage select
mxc_gpio_drvstr_t dssel; ///< Drive Strength select
} mxc_gpio_cfg_t;

/**
Expand Down Expand Up @@ -339,6 +350,15 @@ void MXC_GPIO_ClearWakeEn(mxc_gpio_regs_t *port, uint32_t mask);
*/
uint32_t MXC_GPIO_GetWakeEn(mxc_gpio_regs_t *port);

/**
* @brief Set Drive Strength for pins.
*
* @param port The GPIO port.
* @param[in] ds Drive strength level. Ref /mxc_gpio_ds_t enum type.
* @param[in] mask Pins in the GPIO port that will be set to the voltage.
*/
int MXC_GPIO_SetDriveStrength(mxc_gpio_regs_t *port, mxc_gpio_ds_t ds, uint32_t mask);

/**@} end of group gpio */

#ifdef __cplusplus
Expand Down
Loading

0 comments on commit d721f18

Please sign in to comment.