Przeglądaj źródła

Work. But not was expected.

Vladimir N. Shilov 2 lat temu
rodzic
commit
a66c7428b2
3 zmienionych plików z 13 dodań i 11 usunięć
  1. 1 1
      MDK-ARM/MNC-IN12x5.uvoptx
  2. 10 8
      Src/clock.c
  3. 2 2
      Src/stm32g0xx_it.c

+ 1 - 1
MDK-ARM/MNC-IN12x5.uvoptx

@@ -140,7 +140,7 @@
         <SetRegEntry>
           <Number>0</Number>
           <Key>DLGUARM</Key>
-          <Name></Name>
+          <Name>ИЪВw</Name>
         </SetRegEntry>
         <SetRegEntry>
           <Number>0</Number>

+ 10 - 8
Src/clock.c

@@ -141,34 +141,36 @@ void new_Second(void) {
   * On/off symbols on IN-15 tube.
   */
 void in15Off(void) {
-  //IN15_OFF;
+  IN15_OFF;
   //TUBE_C_OFF;
-  SymbolIN15 = sym_Off;
+	//while (SymbolIN15 != sym_None) {}
+  //SymbolIN15 = sym_Off;
 }
 
 void in15Minus(void) {
   //IN15_OFF;
   //IN15_Minus;
   //TUBE_C_ON;
+	while (SymbolIN15 != sym_None) {}
   SymbolIN15 = sym_Minus;
 }
 
 void in15Plus(void) {
-  //IN15_OFF;
+  IN15_OFF;
   //IN15_Plus;
   //TUBE_C_ON;
   SymbolIN15 = sym_Plus;
 }
 
 void in15Percent(void) {
-  //IN15_OFF;
+  IN15_OFF;
   //IN15_Percent;
   //TUBE_C_ON;
   SymbolIN15 = sym_Percent;
 }
 
 void in15P(void) {
-  //IN15_OFF;
+  IN15_OFF;
   //IN15_P;
   //TUBE_C_ON;
   SymbolIN15 = sym_Pressure;
@@ -384,9 +386,9 @@ static void HSV2LED(const uint8_t hue, const uint8_t val) {
   */
 void showTime(void) {
   uint8_t hue;
-  //MinusFadeIn();
-  in15Minus();
-  RTOS_SetTask(in15Off, 500, 0); // MinusFadeOut
+	//MinusFadeIn();
+	in15Minus();
+  RTOS_SetTask(in15Off, 500, 0);
 
   switch (LightingMode) {
   case light_Rainbow:

+ 2 - 2
Src/stm32g0xx_it.c

@@ -214,7 +214,7 @@ void TIM16_IRQHandler(void)
 
   if ((TIM16->SR & TIM_SR_UIF) != 0) {
     /* Clear interrupt flag */
-    TIM16->SR |= TIM_SR_UIF;
+    TIM16->SR = 0;
 
     if (SymbolIN15 != sym_None) {
       if (cnt > 0) {
@@ -250,7 +250,7 @@ void TIM17_IRQHandler(void)
 {
   if ((TIM17->SR & TIM_SR_UIF) != 0) {
     /* Update interrupt flag */
-    TIM17->SR |= TIM_SR_UIF;
+    TIM17->SR = 0;
   }
 }