Heartbeat used on X10

This commit is contained in:
Bertrand Songis
2019-07-16 09:42:49 +02:00
parent a6fdaa290e
commit e0214ee51b
5 changed files with 14 additions and 6 deletions
@@ -39,7 +39,7 @@ void init_intmodule_heartbeat()
EXTI_StructInit(&EXTI_InitStructure);
EXTI_InitStructure.EXTI_Line = INTMODULE_HEARTBEAT_EXTI_LINE;
EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt;
EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Falling;
EXTI_InitStructure.EXTI_Trigger = INTMODULE_HEARTBEAT_TRIGGER;
EXTI_InitStructure.EXTI_LineCmd = ENABLE;
EXTI_Init(&EXTI_InitStructure);
@@ -60,7 +60,7 @@ void stop_intmodule_heartbeat()
EXTI_StructInit(&EXTI_InitStructure);
EXTI_InitStructure.EXTI_Line = INTMODULE_HEARTBEAT_EXTI_LINE;
EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt;
EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Falling;
EXTI_InitStructure.EXTI_Trigger = INTMODULE_HEARTBEAT_TRIGGER;
EXTI_InitStructure.EXTI_LineCmd = DISABLE;
EXTI_Init(&EXTI_InitStructure);
}
@@ -68,7 +68,7 @@ void stop_intmodule_heartbeat()
void check_intmodule_heartbeat()
{
if (EXTI_GetITStatus(INTMODULE_HEARTBEAT_EXTI_LINE) != RESET) {
#if defined(PXX2)
#if defined(INTMODULE_USART)
heartbeatCapture.timestamp = RTOS_GET_MS();
#else
heartbeatCapture.timestamp = getTmr2MHz();