24 lines
691 B
C
24 lines
691 B
C
#ifndef MAIN_H_
|
|
#define MAIN_H_
|
|
|
|
/******************************************************************
|
|
* ãëîáàëüíûå ôëàãè
|
|
******************************************************************/
|
|
/* íàäî ëè ôèëüòðîâàòü äàííûå ñ äàò÷èêîâ */
|
|
#define GET_FILTERED_DATA TRUE
|
|
|
|
/* âêëþ÷èòü ñòðåññîâîå òåñòèðîâàíèå */
|
|
#define ENABLE_IRQ_STORM FALSE
|
|
|
|
// usefull macros
|
|
#define WATCHDOG_INIT {\
|
|
DBGMCU->CR |= DBGMCU_CR_DBG_IWDG_STOP; /* stop watchdog timer in debugging mode */\
|
|
IWDG->KR = 0x5555;/*unlock PR register*/\
|
|
IWDG->PR = 16;/*set 1.6384s timeout*/\
|
|
IWDG->KR = 0xCCCC;/*start watchdog*/}
|
|
|
|
#define WATCHDOG_RELOAD {IWDG->KR = 0xAAAA;}
|
|
|
|
|
|
#endif /* MAIN_H_ */
|