Merge pull request #63 from pjonsson/fix-test-warnings

tests: remove unused functions
This commit is contained in:
Niclas Finne 2022-05-25 13:22:50 +02:00 committed by GitHub
commit cecca91a32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 65 deletions

View File

@ -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));
}

View File

@ -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