mirror of https://github.com/contiki-ng/mspsim
tests: remove unused functions
This commit is contained in:
parent
c82dc9e90f
commit
78e45ee613
|
|
@ -333,63 +333,3 @@ msp430_setup(void)
|
|||
|
||||
rs232_init();
|
||||
}
|
||||
|
||||
#define asmv(arg) __asm__ __volatile__(arg)
|
||||
|
||||
#define STACK_EXTRA 32
|
||||
|
||||
static char *cur_break = (char *)(
|
||||
#if defined(__MSP430_LIBC__) && 20110612 <= __MSP430_LIBC__
|
||||
__bss_end
|
||||
#else
|
||||
&__bss_end + 1
|
||||
#endif
|
||||
);
|
||||
|
||||
/*
|
||||
* Allocate memory from the heap. Check that we don't collide with the
|
||||
* stack right now (some other routine might later). A watchdog might
|
||||
* be used to check if cur_break and the stack pointer meet during
|
||||
* runtime.
|
||||
*/
|
||||
void *
|
||||
sbrk(int incr)
|
||||
{
|
||||
char *stack_pointer;
|
||||
|
||||
asmv("mov r1, %0" : "=r" (stack_pointer));
|
||||
stack_pointer -= STACK_EXTRA;
|
||||
if(incr > (stack_pointer - cur_break))
|
||||
return (void *)-1; /* ENOMEM */
|
||||
|
||||
void *old_break = cur_break;
|
||||
cur_break += incr;
|
||||
/*
|
||||
* If the stack was never here then [old_break .. cur_break] should
|
||||
* be filled with zeros.
|
||||
*/
|
||||
return old_break;
|
||||
}
|
||||
|
||||
/*
|
||||
* Mask all interrupts that can be masked.
|
||||
*/
|
||||
int
|
||||
splhigh_(void)
|
||||
{
|
||||
/* Clear the GIE (General Interrupt Enable) flag. */
|
||||
int sr;
|
||||
asmv("mov r2, %0" : "=r" (sr));
|
||||
asmv("bic %0, r2" : : "i" (GIE));
|
||||
return sr & GIE; /* Ignore other sr bits. */
|
||||
}
|
||||
|
||||
/*
|
||||
* Restore previous interrupt mask.
|
||||
*/
|
||||
void
|
||||
splx_(int sr)
|
||||
{
|
||||
/* If GIE was set, restore it. */
|
||||
asmv("bis %0, r2" : : "r" (sr));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,11 +67,6 @@
|
|||
#define assertTrue2(text,...) TEST2(text,__VA_ARGS__)
|
||||
#define assertFalse2(text,...) TEST2(text,!(__VA_ARGS__))
|
||||
|
||||
static int testzero(int hm)
|
||||
{
|
||||
return hm > 0;
|
||||
}
|
||||
|
||||
static int caseID = 0;
|
||||
|
||||
#define RTIMER_ARCH_SECOND 4096
|
||||
|
|
|
|||
Loading…
Reference in New Issue