Skip to content

Commit

Permalink
修复了IR的一些错误
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanyin1985 committed Mar 25, 2019
1 parent 572c297 commit 3d9ae7e
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Common/Hardware/Ir.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "IrOut.h"
#include "Q_Heap.h"

#define DECODE_38K_MYSELF 1//自己解码38kHz的脉冲
#define DECODE_38K_MYSELF 0//自己解码38kHz的脉冲
static u32 gLast13usPluseTimeCnt=0;//38k脉冲最后一个脉冲点的时间记数

//硬件参数配置
Expand Down
2 changes: 1 addition & 1 deletion src/Common/Hardware/IrOut.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "Drivers.h"

#if 0//定时器+io的形式
#if 1//定时器+io的形式
#define IrPluseGen_ISR TIM3_IRQHandler
#define IrPluseTimerSet Tim3_Set
#define IrPluseTimerID TIM3
Expand Down
2 changes: 1 addition & 1 deletion src/Common/Misc/IoDefines.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ static const IO_IN_HAL_DEFINE gIoInDefs[IOIN_MAX]={
{IOIN_PIO5, GPI_A, GPin5, GPIO_Mode_IPU,EXTI_Trigger_Rising_Falling,0,0},
{IOIN_PIO6, GPI_A, GPin6, GPIO_Mode_IPU,EXTI_Trigger_Rising_Falling,0,0},
{IOIN_PIO7, GPI_A, GPin7, GPIO_Mode_IPU,EXTI_Trigger_Rising_Falling,0,0},
{IOIN_IR_IN, GPI_A, GPin11, GPIO_Mode_IPU,EXTI_Trigger_Rising_Falling,EXTI3_IRQn,EXTI_Pio_Priority},
{IOIN_IR_IN, GPI_A, GPin11, GPIO_Mode_IPU,EXTI_Trigger_Rising_Falling,EXTI15_10_IRQn,EXTI_Pio_Priority},
{IOIN_USER_KEY, GPI_B, GPin1, GPIO_Mode_IPU,EXTI_Trigger_Rising_Falling,EXTI1_IRQn,EXTI_Pio_Priority},
};

Expand Down
2 changes: 2 additions & 0 deletions src/Core/User/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,10 @@ int main(void)
#endif

//开中断
//IOIN_OpenExti(IOIN_IR_IN);
IOIN_OpenExti(IOIN_PIO0);


EventStateHandler();

while(1);
Expand Down
1 change: 1 addition & 0 deletions src/Core/User/stm32f10x_it.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,7 @@ void EXTI15_10_IRQHandler(void)
if(EXTI_GetITStatus(EXTI_Line11) != RESET)
{
EXTI_ClearITPendingBit(EXTI_Line11);
IrPulseIn_ISR();
}

if(EXTI_GetITStatus(EXTI_Line12) != RESET)
Expand Down

0 comments on commit 3d9ae7e

Please sign in to comment.