X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fstmf0%2Fao_gpio.c;h=024ff948645525e8e3eb06b774542ff975070db9;hb=refs%2Fheads%2Fmaster;hp=c7bf07971c407d3db9cdea548de48a2806e26309;hpb=5ce26345784459f5864ef59c96c8aa633d2ddf64;p=fw%2Faltos diff --git a/src/stmf0/ao_gpio.c b/src/stmf0/ao_gpio.c index c7bf0797..a21ce4fa 100644 --- a/src/stmf0/ao_gpio.c +++ b/src/stmf0/ao_gpio.c @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of @@ -22,13 +23,13 @@ ao_gpio_suspend(void *arg) { struct stm_gpio *port = arg; if (port == &stm_gpioa) - stm_rcc.ahbenr &= ~(1 << STM_RCC_AHBENR_IOPAEN); + stm_rcc.ahbenr &= ~(1UL << STM_RCC_AHBENR_IOPAEN); else if ((port) == &stm_gpiob) - stm_rcc.ahbenr &= ~(1 << STM_RCC_AHBENR_IOPBEN); + stm_rcc.ahbenr &= ~(1UL << STM_RCC_AHBENR_IOPBEN); else if ((port) == &stm_gpioc) - stm_rcc.ahbenr &= ~(1 << STM_RCC_AHBENR_IOPCEN); + stm_rcc.ahbenr &= ~(1UL << STM_RCC_AHBENR_IOPCEN); else if ((port) == &stm_gpiof) - stm_rcc.ahbenr &= ~(1 << STM_RCC_AHBENR_IOPFEN); + stm_rcc.ahbenr &= ~(1UL << STM_RCC_AHBENR_IOPFEN); } static void