initial commit
This commit is contained in:
commit
9f225a2c9d
113 changed files with 116214 additions and 0 deletions
63
application/diag.h
Normal file
63
application/diag.h
Normal file
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
* diag.h
|
||||
*
|
||||
* Created on: Sep 16, 2019
|
||||
* Author: abody
|
||||
*/
|
||||
|
||||
#ifndef DIAG_H_
|
||||
#define DIAG_H_
|
||||
|
||||
#ifdef ENABLE_DIAG
|
||||
#define DIAG_RX_BUFFER_SWITCH(x) \
|
||||
if(x) { \
|
||||
LL_GPIO_SetOutputPin(LED0_GPIO_Port, LED0_Pin); \
|
||||
LL_GPIO_ResetOutputPin(LED1_GPIO_Port, LED1_Pin); \
|
||||
} else { \
|
||||
LL_GPIO_ResetOutputPin(LED0_GPIO_Port, LED0_Pin); \
|
||||
LL_GPIO_SetOutputPin(LED1_GPIO_Port, LED1_Pin); \
|
||||
}
|
||||
|
||||
#define DIAG_INTERRUPT_IN() LL_GPIO_SetOutputPin(DBG0_GPIO_Port, DBG0_Pin)
|
||||
#define DIAG_INTERRUPT_OUT() LL_GPIO_ResetOutputPin(DBG0_GPIO_Port, DBG0_Pin)
|
||||
#define DIAG_CRC_CALC_START() LL_GPIO_SetOutputPin(DBG1_GPIO_Port, DBG1_Pin)
|
||||
#define DIAG_CRC_CALC_END() LL_GPIO_ResetOutputPin(DBG1_GPIO_Port, DBG1_Pin)
|
||||
//#define DIAG_ERROR_EVENT() LL_GPIO_TogglePin(DBG2_GPIO_Port, DBG2_Pin)
|
||||
#define DIAG_ENTER_BUSY() LL_GPIO_SetOutputPin(DBG2_GPIO_Port, DBG2_Pin)
|
||||
#define DIAG_EXIT_BUSY() LL_GPIO_ResetOutputPin(DBG2_GPIO_Port, DBG2_Pin)
|
||||
|
||||
#endif // _ENABLE_DIAG
|
||||
|
||||
#ifndef DIAG_RX_BUFFER_SWITCH
|
||||
# define DIAG_RX_BUFFER_SWITCH(x)
|
||||
#endif
|
||||
|
||||
#ifndef DIAG_CRC_CALC_START
|
||||
# define DIAG_CRC_CALC_START()
|
||||
#endif
|
||||
|
||||
#ifndef DIAG_CRC_CALC_END
|
||||
# define DIAG_CRC_CALC_END()
|
||||
#endif
|
||||
|
||||
#ifndef DIAG_INTERRUPT_IN
|
||||
# define DIAG_INTERRUPT_IN()
|
||||
#endif
|
||||
|
||||
#ifndef DIAG_INTERRUPT_OUT
|
||||
# define DIAG_INTERRUPT_OUT()
|
||||
#endif
|
||||
|
||||
#ifndef DIAG_ERROR_EVENT
|
||||
# define DIAG_ERROR_EVENT()
|
||||
#endif
|
||||
|
||||
#ifndef DIAG_ENTER_BUSY
|
||||
# define DIAG_ENTER_BUSY()
|
||||
#endif
|
||||
|
||||
#ifndef DIAG_EXIT_BUSY
|
||||
# define DIAG_EXIT_BUSY()
|
||||
#endif
|
||||
|
||||
#endif /* DIAG_H_ */
|
Loading…
Add table
Add a link
Reference in a new issue