File tree Expand file tree Collapse file tree 2 files changed +16
-14
lines changed
targets/TARGET_Maxim/TARGET_MAX32670/Libraries/PeriphDrivers Expand file tree Collapse file tree 2 files changed +16
-14
lines changed Original file line number Diff line number Diff line change @@ -207,18 +207,18 @@ void MXC_LP_ClearWakeStatus (void);
207207 * @brief Enables the selected GPIO port and its selected pins to wake up the device from any low power mode.
208208 * Call this function multiple times to enable pins on multiple ports. This function does not configure
209209 * the GPIO pins nor does it setup their interrupt functionality.
210- * @param wu_pins The port and pins to configure as wakeup sources. Only the gpio and mask fields of the
211- * structure are used. The func and pad fields are ignored. \ref mxc_gpio_cfg_t
210+ * @param port The port to configure as wakeup sources.
211+ * @param mask The pins to configure as wakeup sources.
212212 */
213- void MXC_LP_EnableGPIOWakeup ( mxc_gpio_cfg_t * wu_pins );
213+ void MXC_LP_EnableGPIOWakeup ( unsigned int port , unsigned int mask );
214214
215215/**
216216 * @brief Disables the selected GPIO port and its selected pins as a wake up source.
217217 * Call this function multiple times to disable pins on multiple ports.
218- * @param wu_pins The port and pins to disable as wakeup sources. Only the gpio and mask fields of the
219- * structure are used. The func and pad fields are ignored. \ref mxc_gpio_cfg_t
218+ * @param port The port to configure as wakeup sources.
219+ * @param mask The pins to configure as wakeup sources.
220220 */
221- void MXC_LP_DisableGPIOWakeup (mxc_gpio_cfg_t * wu_pins );
221+ void MXC_LP_DisableGPIOWakeup (unsigned int port , unsigned int mask );
222222
223223/**
224224 * @brief Enables the RTC alarm to wake up the device from any low power mode.
Original file line number Diff line number Diff line change @@ -187,29 +187,31 @@ void MXC_LP_ClearWakeStatus(void)
187187 MXC_PWRSEQ -> lppwkst = 0xFFFFFFFF ;
188188}
189189
190- void MXC_LP_EnableGPIOWakeup (mxc_gpio_cfg_t * wu_pins )
190+ void MXC_LP_EnableGPIOWakeup (unsigned int port , unsigned int mask )
191191{
192192 MXC_GCR -> pm |= MXC_F_GCR_PM_GPIO_WE ;
193193
194- switch (1 << MXC_GPIO_GET_IDX ( wu_pins -> port ) ) {
194+ switch (1 << port ) {
195195 case MXC_GPIO_PORT_0 :
196- MXC_PWRSEQ -> lpwken0 |= wu_pins -> mask ;
196+ MXC_PWRSEQ -> lpwken0 |= mask ;
197197 break ;
198198
199199 case MXC_GPIO_PORT_1 :
200- MXC_PWRSEQ -> lpwken1 |= wu_pins -> mask ;
200+ MXC_PWRSEQ -> lpwken1 |= mask ;
201+ break ;
201202 }
202203}
203204
204- void MXC_LP_DisableGPIOWakeup (mxc_gpio_cfg_t * wu_pins )
205+ void MXC_LP_DisableGPIOWakeup (unsigned int port , unsigned int mask )
205206{
206- switch (1 << MXC_GPIO_GET_IDX ( wu_pins -> port ) ) {
207+ switch (1 << port ) {
207208 case MXC_GPIO_PORT_0 :
208- MXC_PWRSEQ -> lpwken0 &= ~wu_pins -> mask ;
209+ MXC_PWRSEQ -> lpwken0 &= ~mask ;
209210 break ;
210211
211212 case MXC_GPIO_PORT_1 :
212- MXC_PWRSEQ -> lpwken1 &= ~wu_pins -> mask ;
213+ MXC_PWRSEQ -> lpwken1 &= ~mask ;
214+ break ;
213215 }
214216
215217 if (MXC_PWRSEQ -> lpwken1 == 0 && MXC_PWRSEQ -> lpwken0 == 0 ) {
You can’t perform that action at this time.
0 commit comments