mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-21 23:33:57 -04:00
AAP_HAL_ChibiOS: allow asserts to be printed on a GPIO pin
This commit is contained in:
parent
d41c92d317
commit
6f5d5c2bf9
@ -53,6 +53,21 @@
|
||||
#define CH_DBG_SYSTEM_STATE_CHECK TRUE
|
||||
#undef CH_DBG_ENABLE_STACK_CHECK
|
||||
#define CH_DBG_ENABLE_STACK_CHECK TRUE
|
||||
|
||||
// Generate assertions on a GPIO pin
|
||||
#ifdef HAL_GPIO_PIN_FAULT
|
||||
#ifndef _FROM_ASM_
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
void fault_printf(const char *fmt, ...);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#define osalDbgAssert(c, remark) do { if (!(c)) { fault_printf("%s:%d: %s", __FILE__, __LINE__, remark ); chDbgAssert(c, remark); } } while (0)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if HAL_ENABLE_THREAD_STATISTICS
|
||||
|
Loading…
Reference in New Issue
Block a user