tests: some fixes for <32bit platforms

pr/spi.typo
Kaspar Schleiser 7 years ago committed by Joakim Nohlgård
parent 46bd2f45d9
commit 9bb61f5aca

@ -24,7 +24,7 @@
#include "bh1750fvi.h"
#include "bh1750fvi_params.h"
#define RATE (200 * MS_IN_USEC) /* 200ms */
#define RATE (200LU * MS_IN_USEC) /* 200ms */
int main(void)
{

@ -36,7 +36,7 @@
#error "TEST_MODE not defined"
#endif
#define SAMPLE_PERIOD (100 * 1000U)
#define SAMPLE_PERIOD (100LU * 1000U)
static srf02_t dev;

@ -25,7 +25,7 @@
#define RES ADC_RES_10BIT
#define DELAY (100 * 1000U)
#define DELAY (100LU * 1000U)
int main(void)

@ -26,7 +26,7 @@
/**
* @brief Read th sensors every second
*/
#define INTERVAL (1000000U)
#define INTERVAL (1000000LU)
int main(void)

@ -38,9 +38,9 @@
* TEST_MSG_RX_USLEEP is a tiny sleep inside the message reception thread to
* cause extra context switches.
*/
#define TEST_HZ (64)
#define TEST_INTERVAL (1000000 / TEST_HZ)
#define TEST_MSG_RX_USLEEP (200)
#define TEST_HZ (64LU)
#define TEST_INTERVAL (1000000LU / TEST_HZ)
#define TEST_MSG_RX_USLEEP (200LU)
char slacker_stack1[THREAD_STACKSIZE_DEFAULT];
char slacker_stack2[THREAD_STACKSIZE_DEFAULT];

@ -26,14 +26,14 @@
#include "xtimer.h"
#include "thread.h"
#define TEST_SECONDS (10U)
#define TEST_SECONDS (10LU)
#define TEST_TIME (TEST_SECONDS * SEC_IN_USEC)
#define STACKSIZE_TIMER (THREAD_STACKSIZE_DEFAULT)
char stack_timer1[STACKSIZE_TIMER];
char stack_timer2[STACKSIZE_TIMER];
long unsigned int count = 0;
unsigned int count = 0;
void* timer_func1(void* arg)
{
@ -55,10 +55,9 @@ void* timer_func2(void* arg)
int main(void)
{
puts("xTimer hang test\n");
printf("This test will print \"Testing... (<percentage>)\" every 100ms for %u seconds.\n", TEST_SECONDS);
printf("This test will print \"Testing... (<percentage>)\" every 100ms for %u seconds.\n", (unsigned)TEST_SECONDS);
printf("If it stops before, the test failed.\n\n");
thread_create(stack_timer1,
@ -81,8 +80,8 @@ int main(void)
while(xtimer_now() < end)
{
count++;
xtimer_usleep(100U * 1000);
printf("Testing... (%lu%%)\n", count);
xtimer_usleep(100LU * 1000);
printf("Testing... (%u%%)\n", count);
}
printf("Test successful.\n");

Loading…
Cancel
Save