Vladimir Shilov 5 年 前
コミット
a02655f0af
4 ファイル変更3 行追加5 行削除
  1. 1 1
      inc/common.h
  2. 1 1
      inc/rtos.h
  3. 0 2
      src/ds3231.c
  4. 1 1
      src/main.c

+ 1 - 1
inc/common.h

@@ -5,7 +5,7 @@
 /**
  * Global defines
  */
-//#define USE_BRIGHT_CONTROL
+#define USE_BRIGHT_CONTROL
 #define USE_DHT
 //#define USE_UART
 

+ 1 - 1
inc/rtos.h

@@ -60,7 +60,7 @@ void RTOS_Timer (void);
 void tdelay_ms(uint16_t msek);
 
 inline void tdelay_us(uint16_t usek) {
-  TCNT1 = 0;
+  usek = usek + TCNT1;
   while (TCNT1 < usek) {};
 }
 

+ 0 - 2
src/ds3231.c

@@ -1,8 +1,6 @@
 #include "ds3231.h"
 #include "i2c.h"
 
-//twi_stats_t twi_status;
-
 /**
  * @brief Инициализация RTC
  */

+ 1 - 1
src/main.c

@@ -46,7 +46,7 @@
 #define FULL_BRIGHT_ON    0x06
 #define FULL_BRIGHT_OFF   0x22
 static const uint8_t PROGMEM brightConv[BRIGHT_IDX_MAX+1] = {
-  218, 219, 224, 236, 255
+  218, 225, 230, 240, 255
 };
 #endif // USE_BRIGHT_CONTROL