kopia lustrzana https://github.com/mobilinkd/tnc3-firmware
49 wiersze
1.1 KiB
C
49 wiersze
1.1 KiB
C
|
//
|
||
|
// This file is part of the µOS++ III distribution.
|
||
|
// Copyright (c) 2014 Liviu Ionescu.
|
||
|
//
|
||
|
|
||
|
// ----------------------------------------------------------------------------
|
||
|
|
||
|
#include <stdlib.h>
|
||
|
|
||
|
// ----------------------------------------------------------------------------
|
||
|
|
||
|
extern void
|
||
|
__attribute__((noreturn))
|
||
|
Reset_Handler(void);
|
||
|
|
||
|
// ----------------------------------------------------------------------------
|
||
|
|
||
|
// Forward declaration
|
||
|
|
||
|
void
|
||
|
_exit(int code);
|
||
|
|
||
|
// ----------------------------------------------------------------------------
|
||
|
|
||
|
// On Release, call the hardware reset procedure.
|
||
|
// On Debug we just enter an infinite loop, to be used as landmark when halting
|
||
|
// the debugger.
|
||
|
//
|
||
|
// It can be redefined in the application, if more functionality
|
||
|
// is required.
|
||
|
|
||
|
void
|
||
|
__attribute__((weak))
|
||
|
_exit(int code __attribute__((unused)))
|
||
|
{
|
||
|
Reset_Handler();
|
||
|
}
|
||
|
|
||
|
// ----------------------------------------------------------------------------
|
||
|
|
||
|
void
|
||
|
__attribute__((weak,noreturn))
|
||
|
abort(void)
|
||
|
{
|
||
|
_exit(1);
|
||
|
}
|
||
|
|
||
|
// ----------------------------------------------------------------------------
|