diff --git a/Libraries/PeriphDrivers/Include/MAX32520/gpio.h b/Libraries/PeriphDrivers/Include/MAX32520/gpio.h index 1545b8fdfd2..3ebb014b454 100644 --- a/Libraries/PeriphDrivers/Include/MAX32520/gpio.h +++ b/Libraries/PeriphDrivers/Include/MAX32520/gpio.h @@ -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. */ @@ -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; /** @@ -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 diff --git a/Libraries/PeriphDrivers/Include/MAX32570/gpio.h b/Libraries/PeriphDrivers/Include/MAX32570/gpio.h index 8995cd7c561..18496239354 100644 --- a/Libraries/PeriphDrivers/Include/MAX32570/gpio.h +++ b/Libraries/PeriphDrivers/Include/MAX32570/gpio.h @@ -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. */ @@ -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; /** @@ -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 diff --git a/Libraries/PeriphDrivers/Include/MAX32572/gpio.h b/Libraries/PeriphDrivers/Include/MAX32572/gpio.h index 61455883e2f..e9e9f290a6e 100644 --- a/Libraries/PeriphDrivers/Include/MAX32572/gpio.h +++ b/Libraries/PeriphDrivers/Include/MAX32572/gpio.h @@ -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. */ @@ -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; /** @@ -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 diff --git a/Libraries/PeriphDrivers/Include/MAX32650/gpio.h b/Libraries/PeriphDrivers/Include/MAX32650/gpio.h index aea5858b80c..31465243448 100644 --- a/Libraries/PeriphDrivers/Include/MAX32650/gpio.h +++ b/Libraries/PeriphDrivers/Include/MAX32650/gpio.h @@ -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; /** @@ -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 diff --git a/Libraries/PeriphDrivers/Include/MAX32655/gpio.h b/Libraries/PeriphDrivers/Include/MAX32655/gpio.h index 3424db5f193..8c24be7390c 100644 --- a/Libraries/PeriphDrivers/Include/MAX32655/gpio.h +++ b/Libraries/PeriphDrivers/Include/MAX32655/gpio.h @@ -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. */ @@ -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; /** @@ -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 diff --git a/Libraries/PeriphDrivers/Include/MAX32660/gpio.h b/Libraries/PeriphDrivers/Include/MAX32660/gpio.h index c24a72dbb3a..5cd28c04f5c 100644 --- a/Libraries/PeriphDrivers/Include/MAX32660/gpio.h +++ b/Libraries/PeriphDrivers/Include/MAX32660/gpio.h @@ -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. */ @@ -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; /** @@ -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 diff --git a/Libraries/PeriphDrivers/Include/MAX32662/gpio.h b/Libraries/PeriphDrivers/Include/MAX32662/gpio.h index 83905e84cb5..45d02b42967 100644 --- a/Libraries/PeriphDrivers/Include/MAX32662/gpio.h +++ b/Libraries/PeriphDrivers/Include/MAX32662/gpio.h @@ -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. */ @@ -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; /** @@ -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 diff --git a/Libraries/PeriphDrivers/Include/MAX32665/gpio.h b/Libraries/PeriphDrivers/Include/MAX32665/gpio.h index 1cf8d2c728a..6871d417a10 100644 --- a/Libraries/PeriphDrivers/Include/MAX32665/gpio.h +++ b/Libraries/PeriphDrivers/Include/MAX32665/gpio.h @@ -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; /** @@ -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 diff --git a/Libraries/PeriphDrivers/Include/MAX32670/gpio.h b/Libraries/PeriphDrivers/Include/MAX32670/gpio.h index a0044631945..400c619900e 100644 --- a/Libraries/PeriphDrivers/Include/MAX32670/gpio.h +++ b/Libraries/PeriphDrivers/Include/MAX32670/gpio.h @@ -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. */ @@ -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; /** @@ -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 diff --git a/Libraries/PeriphDrivers/Include/MAX32672/gpio.h b/Libraries/PeriphDrivers/Include/MAX32672/gpio.h index 105f778b947..7e76f5c6889 100644 --- a/Libraries/PeriphDrivers/Include/MAX32672/gpio.h +++ b/Libraries/PeriphDrivers/Include/MAX32672/gpio.h @@ -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. */ @@ -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; /** @@ -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 diff --git a/Libraries/PeriphDrivers/Include/MAX32675/gpio.h b/Libraries/PeriphDrivers/Include/MAX32675/gpio.h index 32a4e6e76fb..80fd5685b73 100644 --- a/Libraries/PeriphDrivers/Include/MAX32675/gpio.h +++ b/Libraries/PeriphDrivers/Include/MAX32675/gpio.h @@ -137,6 +137,16 @@ typedef enum { MXC_GPIO_VSSEL_VDDIOH, ///< Set pin to VIDDIOH voltage } mxc_gpio_vssel_t; +/** + * @brief Enumeration type for the voltage level 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. */ @@ -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; /** @@ -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 diff --git a/Libraries/PeriphDrivers/Include/MAX32680/gpio.h b/Libraries/PeriphDrivers/Include/MAX32680/gpio.h index 5c434eb2b56..4ae8894c00e 100644 --- a/Libraries/PeriphDrivers/Include/MAX32680/gpio.h +++ b/Libraries/PeriphDrivers/Include/MAX32680/gpio.h @@ -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. */ @@ -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; /** @@ -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 diff --git a/Libraries/PeriphDrivers/Include/MAX32690/gpio.h b/Libraries/PeriphDrivers/Include/MAX32690/gpio.h index a0992e247a7..92ab4224fd0 100644 --- a/Libraries/PeriphDrivers/Include/MAX32690/gpio.h +++ b/Libraries/PeriphDrivers/Include/MAX32690/gpio.h @@ -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. */ @@ -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; /** @@ -349,6 +360,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 diff --git a/Libraries/PeriphDrivers/Include/MAX78000/gpio.h b/Libraries/PeriphDrivers/Include/MAX78000/gpio.h index 2dc3afa9320..d75cb3bbf87 100644 --- a/Libraries/PeriphDrivers/Include/MAX78000/gpio.h +++ b/Libraries/PeriphDrivers/Include/MAX78000/gpio.h @@ -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. */ @@ -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; /** @@ -350,6 +361,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 diff --git a/Libraries/PeriphDrivers/Source/GPIO/gpio_ai85.c b/Libraries/PeriphDrivers/Source/GPIO/gpio_ai85.c index 213c60cdae2..e413f73243c 100644 --- a/Libraries/PeriphDrivers/Source/GPIO/gpio_ai85.c +++ b/Libraries/PeriphDrivers/Source/GPIO/gpio_ai85.c @@ -410,3 +410,9 @@ uint32_t MXC_GPIO_GetWakeEn(mxc_gpio_regs_t *port) return MXC_GPIO_RevA_GetWakeEn((mxc_gpio_reva_regs_t *)port); } + +/* ************************************************************************** */ +int MXC_GPIO_SetDriveStrength(mxc_gpio_regs_t *port, mxc_gpio_drvstr_t dssel, uint32_t mask) +{ + return MXC_GPIO_RevA_SetDriveStrength((mxc_gpio_reva_regs_t *)port, dssel, mask); +} diff --git a/Libraries/PeriphDrivers/Source/GPIO/gpio_ai87.c b/Libraries/PeriphDrivers/Source/GPIO/gpio_ai87.c index ff1f46db327..21a26ab6106 100644 --- a/Libraries/PeriphDrivers/Source/GPIO/gpio_ai87.c +++ b/Libraries/PeriphDrivers/Source/GPIO/gpio_ai87.c @@ -417,7 +417,7 @@ uint32_t MXC_GPIO_GetWakeEn(mxc_gpio_regs_t *port) } /* ************************************************************************** */ -int MXC_GPIO_SetDriveStrength(mxc_gpio_regs_t *port, mxc_gpio_ds_t ds, uint32_t mask) +int MXC_GPIO_SetDriveStrength(mxc_gpio_regs_t *port, mxc_gpio_drvstr_t dssel, uint32_t mask) { - return MXC_GPIO_RevA_SetDriveStrength((mxc_gpio_reva_regs_t *)port, ds, mask); + return MXC_GPIO_RevA_SetDriveStrength((mxc_gpio_reva_regs_t *)port, dssel, mask); } diff --git a/Libraries/PeriphDrivers/Source/GPIO/gpio_es17.c b/Libraries/PeriphDrivers/Source/GPIO/gpio_es17.c index 87295ebbcae..f5a940d357e 100644 --- a/Libraries/PeriphDrivers/Source/GPIO/gpio_es17.c +++ b/Libraries/PeriphDrivers/Source/GPIO/gpio_es17.c @@ -217,3 +217,9 @@ uint32_t MXC_GPIO_GetWakeEn(mxc_gpio_regs_t *port) { return MXC_GPIO_RevA_GetWakeEn((mxc_gpio_reva_regs_t *)port); } + +/* ************************************************************************** */ +int MXC_GPIO_SetDriveStrength(mxc_gpio_regs_t *port, mxc_gpio_drvstr_t dssel, uint32_t mask) +{ + return MXC_GPIO_RevA_SetDriveStrength((mxc_gpio_reva_regs_t *)port, dssel, mask); +} diff --git a/Libraries/PeriphDrivers/Source/GPIO/gpio_me10.c b/Libraries/PeriphDrivers/Source/GPIO/gpio_me10.c index 9231b106640..21a8b1cb0e6 100644 --- a/Libraries/PeriphDrivers/Source/GPIO/gpio_me10.c +++ b/Libraries/PeriphDrivers/Source/GPIO/gpio_me10.c @@ -254,4 +254,10 @@ void MXC_GPIO_ClearWakeEn(mxc_gpio_regs_t *port, uint32_t mask) uint32_t MXC_GPIO_GetWakeEn(mxc_gpio_regs_t *port) { return MXC_GPIO_RevA_GetWakeEn((mxc_gpio_reva_regs_t *)port); +} + +/* ************************************************************************** */ +int MXC_GPIO_SetDriveStrength(mxc_gpio_regs_t *port, mxc_gpio_drvstr_t dssel, uint32_t mask) +{ + return MXC_GPIO_RevA_SetDriveStrength((mxc_gpio_reva_regs_t *)port, dssel, mask); } \ No newline at end of file diff --git a/Libraries/PeriphDrivers/Source/GPIO/gpio_me11.c b/Libraries/PeriphDrivers/Source/GPIO/gpio_me11.c index 78c1e0fbf9c..42a9b693892 100644 --- a/Libraries/PeriphDrivers/Source/GPIO/gpio_me11.c +++ b/Libraries/PeriphDrivers/Source/GPIO/gpio_me11.c @@ -220,3 +220,8 @@ uint32_t MXC_GPIO_GetWakeEn(mxc_gpio_regs_t *port) { return MXC_GPIO_RevA_GetWakeEn((mxc_gpio_reva_regs_t *)port); } + +int MXC_GPIO_SetDriveStrength(mxc_gpio_regs_t *port, mxc_gpio_drvstr_t dssel, uint32_t mask) +{ + return MXC_GPIO_RevA_SetDriveStrength((mxc_gpio_reva_regs_t *)port, dssel, mask); +} diff --git a/Libraries/PeriphDrivers/Source/GPIO/gpio_me12.c b/Libraries/PeriphDrivers/Source/GPIO/gpio_me12.c index eaa30f34790..8b675ed77c1 100644 --- a/Libraries/PeriphDrivers/Source/GPIO/gpio_me12.c +++ b/Libraries/PeriphDrivers/Source/GPIO/gpio_me12.c @@ -229,3 +229,9 @@ uint32_t MXC_GPIO_GetWakeEn(mxc_gpio_regs_t *port) { return MXC_GPIO_RevA_GetWakeEn((mxc_gpio_reva_regs_t *)port); } + +/* ************************************************************************** */ +int MXC_GPIO_SetDriveStrength(mxc_gpio_regs_t *port, mxc_gpio_drvstr_t dssel, uint32_t mask) +{ + return MXC_GPIO_RevA_SetDriveStrength((mxc_gpio_reva_regs_t *)port, dssel, mask); +} diff --git a/Libraries/PeriphDrivers/Source/GPIO/gpio_me13.c b/Libraries/PeriphDrivers/Source/GPIO/gpio_me13.c index c2f39b03699..68ab8da4474 100644 --- a/Libraries/PeriphDrivers/Source/GPIO/gpio_me13.c +++ b/Libraries/PeriphDrivers/Source/GPIO/gpio_me13.c @@ -241,3 +241,8 @@ uint32_t MXC_GPIO_GetWakeEn(mxc_gpio_regs_t *port) { return MXC_GPIO_RevA_GetWakeEn((mxc_gpio_reva_regs_t *)port); } + +int MXC_GPIO_SetDriveStrength(mxc_gpio_regs_t *port, mxc_gpio_drvstr_t dssel, uint32_t mask) +{ + return MXC_GPIO_RevA_SetDriveStrength((mxc_gpio_reva_regs_t *)port, dssel, mask); +} diff --git a/Libraries/PeriphDrivers/Source/GPIO/gpio_me14.c b/Libraries/PeriphDrivers/Source/GPIO/gpio_me14.c index a4d8e36709e..c5992d8821c 100644 --- a/Libraries/PeriphDrivers/Source/GPIO/gpio_me14.c +++ b/Libraries/PeriphDrivers/Source/GPIO/gpio_me14.c @@ -238,3 +238,9 @@ uint32_t MXC_GPIO_GetWakeEn(mxc_gpio_regs_t *port) { return MXC_GPIO_RevA_GetWakeEn((mxc_gpio_reva_regs_t *)port); } + +/* ************************************************************************** */ +int MXC_GPIO_SetDriveStrength(mxc_gpio_regs_t *port, mxc_gpio_drvstr_t dssel, uint32_t mask) +{ + return MXC_GPIO_RevA_SetDriveStrength((mxc_gpio_reva_regs_t *)port, dssel, mask); +} diff --git a/Libraries/PeriphDrivers/Source/GPIO/gpio_me15.c b/Libraries/PeriphDrivers/Source/GPIO/gpio_me15.c index 127ed213a8f..f8b9de23825 100644 --- a/Libraries/PeriphDrivers/Source/GPIO/gpio_me15.c +++ b/Libraries/PeriphDrivers/Source/GPIO/gpio_me15.c @@ -200,3 +200,8 @@ uint32_t MXC_GPIO_GetWakeEn(mxc_gpio_regs_t *port) { return MXC_GPIO_RevA_GetWakeEn((mxc_gpio_reva_regs_t *)port); } + +int MXC_GPIO_SetDriveStrength(mxc_gpio_regs_t *port, mxc_gpio_drvstr_t dssel, uint32_t mask) +{ + return MXC_GPIO_RevA_SetDriveStrength((mxc_gpio_reva_regs_t *)port, dssel, mask); +} diff --git a/Libraries/PeriphDrivers/Source/GPIO/gpio_me16.c b/Libraries/PeriphDrivers/Source/GPIO/gpio_me16.c index 44c01de35a8..00bc6e279dc 100644 --- a/Libraries/PeriphDrivers/Source/GPIO/gpio_me16.c +++ b/Libraries/PeriphDrivers/Source/GPIO/gpio_me16.c @@ -201,3 +201,8 @@ uint32_t MXC_GPIO_GetWakeEn(mxc_gpio_regs_t *port) { return MXC_GPIO_RevA_GetWakeEn((mxc_gpio_reva_regs_t *)port); } + +int MXC_GPIO_SetDriveStrength(mxc_gpio_regs_t *port, mxc_gpio_drvstr_t dssel, uint32_t mask) +{ + return MXC_GPIO_RevA_SetDriveStrength((mxc_gpio_reva_regs_t *)port, dssel, mask); +} diff --git a/Libraries/PeriphDrivers/Source/GPIO/gpio_me17.c b/Libraries/PeriphDrivers/Source/GPIO/gpio_me17.c index 213c60cdae2..e413f73243c 100644 --- a/Libraries/PeriphDrivers/Source/GPIO/gpio_me17.c +++ b/Libraries/PeriphDrivers/Source/GPIO/gpio_me17.c @@ -410,3 +410,9 @@ uint32_t MXC_GPIO_GetWakeEn(mxc_gpio_regs_t *port) return MXC_GPIO_RevA_GetWakeEn((mxc_gpio_reva_regs_t *)port); } + +/* ************************************************************************** */ +int MXC_GPIO_SetDriveStrength(mxc_gpio_regs_t *port, mxc_gpio_drvstr_t dssel, uint32_t mask) +{ + return MXC_GPIO_RevA_SetDriveStrength((mxc_gpio_reva_regs_t *)port, dssel, mask); +} diff --git a/Libraries/PeriphDrivers/Source/GPIO/gpio_me18.c b/Libraries/PeriphDrivers/Source/GPIO/gpio_me18.c index 72864e4d157..728b3f6cb8b 100644 --- a/Libraries/PeriphDrivers/Source/GPIO/gpio_me18.c +++ b/Libraries/PeriphDrivers/Source/GPIO/gpio_me18.c @@ -432,3 +432,9 @@ uint32_t MXC_GPIO_GetWakeEn(mxc_gpio_regs_t *port) return MXC_GPIO_RevA_GetWakeEn((mxc_gpio_reva_regs_t *)port); } + +/* ************************************************************************** */ +int MXC_GPIO_SetDriveStrength(mxc_gpio_regs_t *port, mxc_gpio_drvstr_t dssel, uint32_t mask) +{ + return MXC_GPIO_RevA_SetDriveStrength((mxc_gpio_reva_regs_t *)port, dssel, mask); +} diff --git a/Libraries/PeriphDrivers/Source/GPIO/gpio_me20.c b/Libraries/PeriphDrivers/Source/GPIO/gpio_me20.c index caf75b1389e..ba74ae2812b 100644 --- a/Libraries/PeriphDrivers/Source/GPIO/gpio_me20.c +++ b/Libraries/PeriphDrivers/Source/GPIO/gpio_me20.c @@ -365,3 +365,9 @@ uint32_t MXC_GPIO_GetWakeEn(mxc_gpio_regs_t *port) { return MXC_GPIO_RevA_GetWakeEn((mxc_gpio_reva_regs_t *)port); } + +/* ************************************************************************** */ +int MXC_GPIO_SetDriveStrength(mxc_gpio_regs_t *port, mxc_gpio_drvstr_t dssel, uint32_t mask) +{ + return MXC_GPIO_RevA_SetDriveStrength((mxc_gpio_reva_regs_t *)port, dssel, mask); +} diff --git a/Libraries/PeriphDrivers/Source/GPIO/gpio_me21.c b/Libraries/PeriphDrivers/Source/GPIO/gpio_me21.c index 9bae699c605..a889ecb742d 100644 --- a/Libraries/PeriphDrivers/Source/GPIO/gpio_me21.c +++ b/Libraries/PeriphDrivers/Source/GPIO/gpio_me21.c @@ -202,3 +202,8 @@ uint32_t MXC_GPIO_GetWakeEn(mxc_gpio_regs_t *port) { return MXC_GPIO_RevA_GetWakeEn((mxc_gpio_reva_regs_t *)port); } + +int MXC_GPIO_SetDriveStrength(mxc_gpio_regs_t *port, mxc_gpio_drvstr_t dssel, uint32_t mask) +{ + return MXC_GPIO_RevA_SetDriveStrength((mxc_gpio_reva_regs_t *)port, dssel, mask); +} diff --git a/Libraries/PeriphDrivers/Source/GPIO/gpio_me55.c b/Libraries/PeriphDrivers/Source/GPIO/gpio_me55.c index e2bc4f2e99b..f552a3f4f7b 100644 --- a/Libraries/PeriphDrivers/Source/GPIO/gpio_me55.c +++ b/Libraries/PeriphDrivers/Source/GPIO/gpio_me55.c @@ -219,3 +219,8 @@ uint32_t MXC_GPIO_GetWakeEn(mxc_gpio_regs_t *port) { return MXC_GPIO_RevA_GetWakeEn((mxc_gpio_reva_regs_t *)port); } + +int MXC_GPIO_SetDriveStrength(mxc_gpio_regs_t *port, mxc_gpio_drvstr_t dssel, uint32_t mask) +{ + return MXC_GPIO_RevA_SetDriveStrength((mxc_gpio_reva_regs_t *)port, dssel, mask); +} diff --git a/Libraries/PeriphDrivers/Source/GPIO/gpio_reva.c b/Libraries/PeriphDrivers/Source/GPIO/gpio_reva.c index 5b01b7c91ab..c8aa23efd95 100644 --- a/Libraries/PeriphDrivers/Source/GPIO/gpio_reva.c +++ b/Libraries/PeriphDrivers/Source/GPIO/gpio_reva.c @@ -236,26 +236,26 @@ uint32_t MXC_GPIO_RevA_GetWakeEn(mxc_gpio_reva_regs_t *port) return port->wken; } -int MXC_GPIO_RevA_SetDriveStrength(mxc_gpio_reva_regs_t *port, mxc_gpio_ds_t ds, uint32_t mask) +int MXC_GPIO_RevA_SetDriveStrength(mxc_gpio_reva_regs_t *port, mxc_gpio_drvstr_t dssel, uint32_t mask) { - // Configure the vssel - switch (ds) { - case MXC_GPIO_DS_0: + // Configure the drive strength. + switch (dssel) { + case MXC_GPIO_DRVSTR_0: port->ds0 &= ~mask; port->ds1 &= ~mask; break; - case MXC_GPIO_DS_1: + case MXC_GPIO_DRVSTR_1: port->ds0 |= mask; port->ds1 &= ~mask; break; - case MXC_GPIO_DS_2: + case MXC_GPIO_DRVSTR_2: port->ds0 &= ~mask; port->ds1 |= mask; break; - case MXC_GPIO_DS_3: + case MXC_GPIO_DRVSTR_3: port->ds0 |= mask; port->ds1 |= mask; break; diff --git a/Libraries/PeriphDrivers/Source/GPIO/gpio_reva.h b/Libraries/PeriphDrivers/Source/GPIO/gpio_reva.h index 72b5ab9d515..259cd571d25 100644 --- a/Libraries/PeriphDrivers/Source/GPIO/gpio_reva.h +++ b/Libraries/PeriphDrivers/Source/GPIO/gpio_reva.h @@ -67,7 +67,7 @@ int MXC_GPIO_RevA_SetAF(mxc_gpio_reva_regs_t *port, mxc_gpio_func_t func, uint32 void MXC_GPIO_RevA_SetWakeEn(mxc_gpio_reva_regs_t *port, uint32_t mask); void MXC_GPIO_RevA_ClearWakeEn(mxc_gpio_reva_regs_t *port, uint32_t mask); uint32_t MXC_GPIO_RevA_GetWakeEn(mxc_gpio_reva_regs_t *port); -int MXC_GPIO_RevA_SetDriveStrength(mxc_gpio_reva_regs_t *port, mxc_gpio_ds_t ds, uint32_t mask); +int MXC_GPIO_RevA_SetDriveStrength(mxc_gpio_reva_regs_t *port, mxc_gpio_drvstr_t dssel, uint32_t mask); /**@} end of group gpio */