You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
CubeSatSim/libs/libmf/source/resetcpu.c

47 lines
602 B

#include "ax8052.h"
#include "libmftypes.h"
#ifdef SDCC
/**
* \brief reset the CPU
*
*/
__reentrantb void reset_cpu(void) __reentrant
{
EA = 0;
GPIOENABLE = 0;
CODECONFIG = 0xD3;
__asm
ljmp 0xE047
__endasm;
}
#elif defined __CX51__ || defined __C51__
__reentrantb void reset_cpu(void) __reentrant
{
EA = 0;
GPIOENABLE = 0;
CODECONFIG = 0xD3;
#pragma asm
ljmp 0xE047
#pragma endasm
}
#elif defined __ICC8051__
__noreturn __reentrantb void reset_cpu(void) __reentrant
{
EA = 0;
GPIOENABLE = 0;
CODECONFIG = 0xD3;
asm("ljmp 0xE047");
}
#else
#error "Compiler unsupported"
#endif

Powered by TurnKey Linux.