diff --git a/nametag8_V003/.cproject b/nametag8_V003/.cproject
index 3688c69..13a178e 100644
--- a/nametag8_V003/.cproject
+++ b/nametag8_V003/.cproject
@@ -64,7 +64,7 @@
diff --git a/nametag8_V003/.settings/language.settings.xml b/nametag8_V003/.settings/language.settings.xml
index 4a661c0..87d54d5 100644
--- a/nametag8_V003/.settings/language.settings.xml
+++ b/nametag8_V003/.settings/language.settings.xml
@@ -5,7 +5,7 @@
-
+
diff --git a/nametag8_V003/user/ch32v00x_conf.h b/nametag8_V003/user/ch32v00x_conf.h
index ce626b7..d906d92 100644
--- a/nametag8_V003/user/ch32v00x_conf.h
+++ b/nametag8_V003/user/ch32v00x_conf.h
@@ -23,11 +23,11 @@
#include
#include
#include
-#include
+//#include
#include
#include
#include
-#include
+//#include
#include "ch32v00x_it.h"
diff --git a/nametag8_V003/user/device/irda.c b/nametag8_V003/user/device/irda.c
index 1f3ca1d..8ef30b2 100644
--- a/nametag8_V003/user/device/irda.c
+++ b/nametag8_V003/user/device/irda.c
@@ -26,7 +26,7 @@
#include "irda.h"
#include "intr_out.h"
-#include "../i2c_slave.h"
+#include "i2c_slave.h"
@@ -106,6 +106,7 @@ void irda_ena_rx()
USART1->CTLR2 &= ~USART_CTLR1_TE;
USART1->CTLR2 |= USART_CTLR1_RE;
+ USART_ClearITPendingBit(USART1, USART_IT_RXNE);
USART_ITConfig(USART1, USART_IT_RXNE, ENABLE);
}
@@ -255,6 +256,7 @@ void irda_process()
}
irda_timeout--;
+ i2cs_reg[REG_IRDA_TIMER] = irda_timeout;
switch (irda_state) {
case IRDA_STATE_TX_HEADER:
diff --git a/nametag8_V003/user/device/irda.h b/nametag8_V003/user/device/irda.h
index f33d2ce..1c6adff 100644
--- a/nametag8_V003/user/device/irda.h
+++ b/nametag8_V003/user/device/irda.h
@@ -25,8 +25,8 @@ enum {
-#define IRDA_HEADER_01 0x5a
-#define IRDA_HEADER_02 0xa5
+#define IRDA_HEADER_01 0x5a
+#define IRDA_HEADER_02 0xa5
#define IRDA_SD_PORT GPIOA