src.dualinventive.com/fw/dncm/libdi_fw/include/di_fw/syshalt.h

27 lines
726 B
C

/**
* @file include/di_fw/syshalt.h
* @brief Syshalt header file
* @date September 1, 2016
* @author J./J.J. Jacobs
* @copyright 2016 Dual Inventive Technology Centre B.V.
*/
/**
* Wrap chSysHalt into a custom syshalt which stops
* the debugger with a breakpoint and prints over semihosting
* In release mode this resets the CPU
* This should be used in chconf.h like this:
* ```
*#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \
* void di_fw_chsyshalt(const char *reason); \
* di_fw_chsyshalt(reason); \
* }
* ```
*/
#ifndef LIBDI_FW_INCLUDE_DI_FW_SYSHALT_H_
#define LIBDI_FW_INCLUDE_DI_FW_SYSHALT_H_
void di_fw_chsyshalt(const char *reason);
#endif /* LIBDI_FW_INCLUDE_DI_FW_SYSHALT_H_ */