diff --git a/bsl/csl/stm32f042/Src/deviceSetup.c b/bsl/csl/stm32f042/Src/deviceSetup.c index 1909dcf..78dd717 100644 --- a/bsl/csl/stm32f042/Src/deviceSetup.c +++ b/bsl/csl/stm32f042/Src/deviceSetup.c @@ -82,12 +82,12 @@ void setupMemory() if(SYS_CLK <= 24000000) { FLASH->ACR = (((FLASH->ACR) & (~(FLASH_ACR_LATENCY_Msk))) | 0); - while( (FLASH->ACR) & (FLASH_ACR_LATENCY_Msk) != 0){} + while( ((FLASH->ACR) & (FLASH_ACR_LATENCY_Msk)) != 0){} } else { FLASH->ACR = (((FLASH->ACR) & (~(FLASH_ACR_LATENCY_Msk))) | 1); - while( (FLASH->ACR) & (FLASH_ACR_LATENCY_Msk) != 1){} + while( ((FLASH->ACR) & (FLASH_ACR_LATENCY_Msk)) != 1){} } } diff --git a/main.cpp b/main.cpp index e6e8d14..36ff8b4 100644 --- a/main.cpp +++ b/main.cpp @@ -1,6 +1,5 @@ #include "main.hpp" #include "delay.h" -//#include "stm32f0xx_csl.h" #include "deviceSetup.h" #include "usart.h" #include "ascii.h" @@ -9,14 +8,10 @@ int main(int argc, char *argv[]) { uint8_t i = 0; uint8_t a = '0'; -<<<<<<< HEAD -======= bool latch = false; bool latch_old = false; - stmStart(); ->>>>>>> 5e93624b4fad253de63e72bcd0e6f45ef3994daf - setupInit(); +// setupInit(); delayInitMs(8000000, 1000); // FreeRTOS_Delay dly; @@ -71,7 +66,6 @@ int main(int argc, char *argv[]) */ - /* //test if the gpio port works as an input if(pinRead(pinA0) && !latch_old) { @@ -81,12 +75,7 @@ int main(int argc, char *argv[]) { pinWrite(pinB3,0); } -<<<<<<< HEAD delayMs(100); -======= - */ -// delayMs(100); ->>>>>>> 5e93624b4fad253de63e72bcd0e6f45ef3994daf } return 1; }