Fixed calls to test suite in all applications.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9202 35acf78f-673a-0410-8e92-d51de3d6d3f4master
parent
109a347ca4
commit
aed82faf72
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
|
|
||||||
static WORKING_AREA(waThread1, 32);
|
static WORKING_AREA(waThread1, 32);
|
||||||
static THD_FUNCTION(Thread1, arg) {
|
static THD_FUNCTION(Thread1, arg) {
|
||||||
|
@ -56,7 +56,7 @@ int main(void) {
|
||||||
*/
|
*/
|
||||||
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
|
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
|
||||||
|
|
||||||
TestThread(&SD1);
|
test_execute((BaseSequentialStream *)&SD1);
|
||||||
while(TRUE) {
|
while(TRUE) {
|
||||||
chThdSleepMilliseconds(1000);
|
chThdSleepMilliseconds(1000);
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
|
|
||||||
static THD_WORKING_AREA(waThread1, 64);
|
static THD_WORKING_AREA(waThread1, 64);
|
||||||
static THD_FUNCTION(Thread1, arg) {
|
static THD_FUNCTION(Thread1, arg) {
|
||||||
|
@ -78,7 +78,7 @@ int main(void) {
|
||||||
chThdCreateStatic(waThread2, sizeof(waThread2), NORMALPRIO, Thread2, NULL);
|
chThdCreateStatic(waThread2, sizeof(waThread2), NORMALPRIO, Thread2, NULL);
|
||||||
chThdCreateStatic(waThread3, sizeof(waThread3), NORMALPRIO, Thread3, NULL);
|
chThdCreateStatic(waThread3, sizeof(waThread3), NORMALPRIO, Thread3, NULL);
|
||||||
|
|
||||||
TestThread(&SD1);
|
test_execute((BaseSequentialStream *)&SD1);
|
||||||
while (1) {
|
while (1) {
|
||||||
chThdSleepMilliseconds(500);
|
chThdSleepMilliseconds(500);
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
|
|
||||||
static THD_WORKING_AREA(waThread1, 64);
|
static THD_WORKING_AREA(waThread1, 64);
|
||||||
static THD_FUNCTION(Thread1, arg) {
|
static THD_FUNCTION(Thread1, arg) {
|
||||||
|
@ -78,7 +78,7 @@ int main(void) {
|
||||||
chThdCreateStatic(waThread2, sizeof(waThread2), NORMALPRIO, Thread2, NULL);
|
chThdCreateStatic(waThread2, sizeof(waThread2), NORMALPRIO, Thread2, NULL);
|
||||||
chThdCreateStatic(waThread3, sizeof(waThread3), NORMALPRIO, Thread3, NULL);
|
chThdCreateStatic(waThread3, sizeof(waThread3), NORMALPRIO, Thread3, NULL);
|
||||||
|
|
||||||
TestThread(&SD1);
|
test_execute((BaseSequentialStream *)&SD1);
|
||||||
while (1) {
|
while (1) {
|
||||||
chThdSleepMilliseconds(500);
|
chThdSleepMilliseconds(500);
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* LED blinker thread.
|
* LED blinker thread.
|
||||||
|
@ -57,7 +57,7 @@ int main(void) {
|
||||||
*/
|
*/
|
||||||
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
|
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
|
||||||
|
|
||||||
TestThread(&SD1);
|
test_execute((BaseSequentialStream *)&SD1);
|
||||||
while (true) {
|
while (true) {
|
||||||
chThdSleepMilliseconds(1000);
|
chThdSleepMilliseconds(1000);
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
|
|
||||||
#define BOTH_BUTTONS (PAL_PORT_BIT(PA_BUTTON1) | PAL_PORT_BIT(PA_BUTTON2))
|
#define BOTH_BUTTONS (PAL_PORT_BIT(PA_BUTTON1) | PAL_PORT_BIT(PA_BUTTON2))
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ int main(void) {
|
||||||
if (!palReadPad(IOPORT1, PA_BUTTON1))
|
if (!palReadPad(IOPORT1, PA_BUTTON1))
|
||||||
sdWrite(&SD1, (uint8_t *)"Hello World!\r\n", 14);
|
sdWrite(&SD1, (uint8_t *)"Hello World!\r\n", 14);
|
||||||
if (!palReadPad(IOPORT1, PA_BUTTON2))
|
if (!palReadPad(IOPORT1, PA_BUTTON2))
|
||||||
TestThread(&SD1);
|
test_execute((BaseSequentialStream *)&SD1);
|
||||||
chThdSleepMilliseconds(500);
|
chThdSleepMilliseconds(500);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
#include "shell.h"
|
#include "shell.h"
|
||||||
#include "chprintf.h"
|
#include "chprintf.h"
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
#include "shell.h"
|
#include "shell.h"
|
||||||
#include "chprintf.h"
|
#include "chprintf.h"
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
#include "shell.h"
|
#include "shell.h"
|
||||||
#include "chprintf.h"
|
#include "chprintf.h"
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
#include "shell.h"
|
#include "shell.h"
|
||||||
#include "chprintf.h"
|
#include "chprintf.h"
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
#include "shell.h"
|
#include "shell.h"
|
||||||
#include "chprintf.h"
|
#include "chprintf.h"
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
#include "shell.h"
|
#include "shell.h"
|
||||||
#include "chprintf.h"
|
#include "chprintf.h"
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
#include "shell.h"
|
#include "shell.h"
|
||||||
#include "chprintf.h"
|
#include "chprintf.h"
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Green LED blinker thread, times are in milliseconds.
|
* Green LED blinker thread, times are in milliseconds.
|
||||||
|
@ -65,7 +65,7 @@ int main(void) {
|
||||||
*/
|
*/
|
||||||
while (true) {
|
while (true) {
|
||||||
if (!palReadPad(GPIOC, GPIOC_BUTTON))
|
if (!palReadPad(GPIOC, GPIOC_BUTTON))
|
||||||
TestThread(&SD2);
|
test_execute((BaseSequentialStream *)&SD2);
|
||||||
chThdSleepMilliseconds(500);
|
chThdSleepMilliseconds(500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Green LED blinker thread, times are in milliseconds.
|
* Green LED blinker thread, times are in milliseconds.
|
||||||
|
@ -66,7 +66,7 @@ int main(void) {
|
||||||
*/
|
*/
|
||||||
while (true) {
|
while (true) {
|
||||||
if (!palReadLine(LINE_ARD_D3))
|
if (!palReadLine(LINE_ARD_D3))
|
||||||
TestThread(&SD1);
|
test_execute((BaseSequentialStream *)&SD1);
|
||||||
chThdSleepMilliseconds(500);
|
chThdSleepMilliseconds(500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Green LED blinker thread, times are in milliseconds.
|
* Green LED blinker thread, times are in milliseconds.
|
||||||
|
@ -66,7 +66,7 @@ int main(void) {
|
||||||
*/
|
*/
|
||||||
while (true) {
|
while (true) {
|
||||||
if (!palReadLine(LINE_ARD_D3))
|
if (!palReadLine(LINE_ARD_D3))
|
||||||
TestThread(&SD2);
|
test_execute((BaseSequentialStream *)&SD2);
|
||||||
chThdSleepMilliseconds(500);
|
chThdSleepMilliseconds(500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Blue LED blinker thread, times are in milliseconds.
|
* Blue LED blinker thread, times are in milliseconds.
|
||||||
|
@ -87,7 +87,7 @@ int main(void) {
|
||||||
*/
|
*/
|
||||||
while (true) {
|
while (true) {
|
||||||
if (palReadPad(GPIOA, GPIOA_BUTTON))
|
if (palReadPad(GPIOA, GPIOA_BUTTON))
|
||||||
TestThread(&SD1);
|
test_execute((BaseSequentialStream *)&SD1);
|
||||||
chThdSleepMilliseconds(500);
|
chThdSleepMilliseconds(500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Blue LED blinker thread, times are in milliseconds.
|
* Blue LED blinker thread, times are in milliseconds.
|
||||||
|
@ -87,7 +87,7 @@ int main(void) {
|
||||||
*/
|
*/
|
||||||
while (true) {
|
while (true) {
|
||||||
if (palReadPad(GPIOA, GPIOA_BUTTON))
|
if (palReadPad(GPIOA, GPIOA_BUTTON))
|
||||||
TestThread(&SD1);
|
test_execute((BaseSequentialStream *)&SD1);
|
||||||
chThdSleepMilliseconds(500);
|
chThdSleepMilliseconds(500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "chprintf.h"
|
#include "chprintf.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Green LED blinker thread, times are in milliseconds.
|
* Green LED blinker thread, times are in milliseconds.
|
||||||
|
@ -67,7 +67,7 @@ int main(void) {
|
||||||
*/
|
*/
|
||||||
while (true) {
|
while (true) {
|
||||||
if (!palReadPad(GPIOC, GPIOC_BUTTON))
|
if (!palReadPad(GPIOC, GPIOC_BUTTON))
|
||||||
TestThread(&SD2);
|
test_execute((BaseSequentialStream *)&SD2);
|
||||||
chThdSleepMilliseconds(500);
|
chThdSleepMilliseconds(500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Green LED blinker thread, times are in milliseconds.
|
* Green LED blinker thread, times are in milliseconds.
|
||||||
|
@ -65,7 +65,7 @@ int main(void) {
|
||||||
*/
|
*/
|
||||||
while (true) {
|
while (true) {
|
||||||
if (!palReadPad(GPIOC, GPIOC_BUTTON))
|
if (!palReadPad(GPIOC, GPIOC_BUTTON))
|
||||||
TestThread(&SD2);
|
test_execute((BaseSequentialStream *)&SD2);
|
||||||
chThdSleepMilliseconds(500);
|
chThdSleepMilliseconds(500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Blinker thread #1.
|
* Blinker thread #1.
|
||||||
|
@ -86,7 +86,7 @@ int main(void) {
|
||||||
*/
|
*/
|
||||||
while (true) {
|
while (true) {
|
||||||
if (palReadPad(GPIOA, GPIOA_BUTTON))
|
if (palReadPad(GPIOA, GPIOA_BUTTON))
|
||||||
TestThread(&SD1);
|
test_execute((BaseSequentialStream *)&SD1);
|
||||||
chThdSleepMilliseconds(500);
|
chThdSleepMilliseconds(500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -516,6 +516,8 @@
|
||||||
/* Port-specific settings (override port settings defaulted in chcore.h). */
|
/* Port-specific settings (override port settings defaulted in chcore.h). */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
#define CORTEX_VTOR_INIT 0x5000
|
||||||
|
|
||||||
#endif /* CHCONF_H */
|
#endif /* CHCONF_H */
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
|
|
||||||
#include "shell.h"
|
#include "shell.h"
|
||||||
#include "chprintf.h"
|
#include "chprintf.h"
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Blinker thread.
|
* Blinker thread.
|
||||||
|
@ -68,7 +68,7 @@ int main(void) {
|
||||||
*/
|
*/
|
||||||
while (true) {
|
while (true) {
|
||||||
if (palReadPad(GPIOA, GPIOA_BUTTON))
|
if (palReadPad(GPIOA, GPIOA_BUTTON))
|
||||||
TestThread(&SD2);
|
test_execute((BaseSequentialStream *)&SD2);
|
||||||
chThdSleepMilliseconds(500);
|
chThdSleepMilliseconds(500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
|
|
||||||
#include "chprintf.h"
|
#include "chprintf.h"
|
||||||
#include "shell.h"
|
#include "shell.h"
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Green LED blinker thread, times are in milliseconds.
|
* Green LED blinker thread, times are in milliseconds.
|
||||||
|
@ -65,7 +65,7 @@ int main(void) {
|
||||||
*/
|
*/
|
||||||
while (true) {
|
while (true) {
|
||||||
if (!palReadPad(GPIOC, GPIOC_BUTTON))
|
if (!palReadPad(GPIOC, GPIOC_BUTTON))
|
||||||
TestThread(&SD2);
|
test_execute((BaseSequentialStream *)&SD2);
|
||||||
chThdSleepMilliseconds(500);
|
chThdSleepMilliseconds(500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
|
|
||||||
#include "shell.h"
|
#include "shell.h"
|
||||||
#include "chprintf.h"
|
#include "chprintf.h"
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is a periodic thread that does absolutely nothing except flashing
|
* This is a periodic thread that does absolutely nothing except flashing
|
||||||
|
@ -69,7 +69,7 @@ int main(void) {
|
||||||
*/
|
*/
|
||||||
while (true) {
|
while (true) {
|
||||||
if (palReadPad(GPIOA, GPIOA_BUTTON))
|
if (palReadPad(GPIOA, GPIOA_BUTTON))
|
||||||
TestThread(&SD2);
|
test_execute((BaseSequentialStream *)&SD2);
|
||||||
chThdSleepMilliseconds(500);
|
chThdSleepMilliseconds(500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Green LED blinker thread, times are in milliseconds.
|
* Green LED blinker thread, times are in milliseconds.
|
||||||
|
@ -65,7 +65,7 @@ int main(void) {
|
||||||
*/
|
*/
|
||||||
while (true) {
|
while (true) {
|
||||||
if (!palReadPad(GPIOC, GPIOC_BUTTON))
|
if (!palReadPad(GPIOC, GPIOC_BUTTON))
|
||||||
TestThread(&SD2);
|
test_execute((BaseSequentialStream *)&SD2);
|
||||||
chThdSleepMilliseconds(500);
|
chThdSleepMilliseconds(500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Blinker thread #1.
|
* Blinker thread #1.
|
||||||
|
@ -112,7 +112,7 @@ int main(void) {
|
||||||
*/
|
*/
|
||||||
while (true) {
|
while (true) {
|
||||||
if (palReadPad(GPIOA, GPIOA_BUTTON))
|
if (palReadPad(GPIOA, GPIOA_BUTTON))
|
||||||
TestThread(&SD1);
|
test_execute((BaseSequentialStream *)&SD1);
|
||||||
chThdSleepMilliseconds(500);
|
chThdSleepMilliseconds(500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Green LED blinker thread, times are in milliseconds.
|
* Green LED blinker thread, times are in milliseconds.
|
||||||
|
@ -66,7 +66,7 @@ int main(void) {
|
||||||
*/
|
*/
|
||||||
while (true) {
|
while (true) {
|
||||||
if (!palReadLine(LINE_ARD_D3))
|
if (!palReadLine(LINE_ARD_D3))
|
||||||
TestThread(&SD2);
|
test_execute((BaseSequentialStream *)&SD2);
|
||||||
chThdSleepMilliseconds(500);
|
chThdSleepMilliseconds(500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* LEDs blinker thread, times are in milliseconds.
|
* LEDs blinker thread, times are in milliseconds.
|
||||||
|
@ -84,7 +84,7 @@ int main(void) {
|
||||||
*/
|
*/
|
||||||
while (true) {
|
while (true) {
|
||||||
if (palReadPad(GPIOA, GPIOA_BUTTON))
|
if (palReadPad(GPIOA, GPIOA_BUTTON))
|
||||||
TestThread(&SD2);
|
test_execute((BaseSequentialStream *)&SD2);
|
||||||
chThdSleepMilliseconds(500);
|
chThdSleepMilliseconds(500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Green LED blinker thread, times are in milliseconds.
|
* Green LED blinker thread, times are in milliseconds.
|
||||||
|
@ -65,7 +65,7 @@ int main(void) {
|
||||||
*/
|
*/
|
||||||
while (true) {
|
while (true) {
|
||||||
if (!palReadPad(GPIOC, GPIOC_BUTTON))
|
if (!palReadPad(GPIOC, GPIOC_BUTTON))
|
||||||
TestThread(&SD2);
|
test_execute((BaseSequentialStream *)&SD2);
|
||||||
chThdSleepMilliseconds(500);
|
chThdSleepMilliseconds(500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is a periodic thread that does absolutely nothing except flashing LEDs.
|
* This is a periodic thread that does absolutely nothing except flashing LEDs.
|
||||||
|
@ -76,7 +76,7 @@ int main(void) {
|
||||||
*/
|
*/
|
||||||
while (true) {
|
while (true) {
|
||||||
if (palReadPad(GPIOA, GPIOA_WKUP_BUTTON))
|
if (palReadPad(GPIOA, GPIOA_WKUP_BUTTON))
|
||||||
TestThread(&SD2);
|
test_execute((BaseSequentialStream *)&SD2);
|
||||||
chThdSleepMilliseconds(500);
|
chThdSleepMilliseconds(500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is a periodic thread that does absolutely nothing except flashing
|
* This is a periodic thread that does absolutely nothing except flashing
|
||||||
|
@ -69,7 +69,7 @@ int main(void) {
|
||||||
*/
|
*/
|
||||||
while (true) {
|
while (true) {
|
||||||
if (palReadPad(GPIOA, GPIOA_BUTTON))
|
if (palReadPad(GPIOA, GPIOA_BUTTON))
|
||||||
TestThread(&SD2);
|
test_execute((BaseSequentialStream *)&SD2);
|
||||||
chThdSleepMilliseconds(500);
|
chThdSleepMilliseconds(500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Green LED blinker thread, times are in milliseconds.
|
* Green LED blinker thread, times are in milliseconds.
|
||||||
|
@ -65,7 +65,7 @@ int main(void) {
|
||||||
*/
|
*/
|
||||||
while (true) {
|
while (true) {
|
||||||
if (!palReadPad(GPIOC, GPIOC_BUTTON))
|
if (!palReadPad(GPIOC, GPIOC_BUTTON))
|
||||||
TestThread(&SD2);
|
test_execute((BaseSequentialStream *)&SD2);
|
||||||
chThdSleepMilliseconds(500);
|
chThdSleepMilliseconds(500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "ch.hpp"
|
#include "ch.hpp"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
|
|
||||||
using namespace chibios_rt;
|
using namespace chibios_rt;
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ protected:
|
||||||
|
|
||||||
setName("tester");
|
setName("tester");
|
||||||
|
|
||||||
TestThread(&SD2);
|
test_execute((BaseSequentialStream *)&SD2);
|
||||||
exit(test_global_fail);
|
exit(test_global_fail);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
|
|
||||||
#include "chprintf.h"
|
#include "chprintf.h"
|
||||||
#include "shell.h"
|
#include "shell.h"
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is a periodic thread that does absolutely nothing except flashing
|
* This is a periodic thread that does absolutely nothing except flashing
|
||||||
|
@ -69,7 +69,7 @@ int main(void) {
|
||||||
*/
|
*/
|
||||||
while (true) {
|
while (true) {
|
||||||
if (palReadPad(GPIOA, GPIOA_BUTTON))
|
if (palReadPad(GPIOA, GPIOA_BUTTON))
|
||||||
TestThread(&SD2);
|
test_execute((BaseSequentialStream *)&SD2);
|
||||||
chThdSleepMilliseconds(500);
|
chThdSleepMilliseconds(500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
|
|
||||||
#include "chprintf.h"
|
#include "chprintf.h"
|
||||||
#include "shell.h"
|
#include "shell.h"
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Green LED blinker thread, times are in milliseconds.
|
* Green LED blinker thread, times are in milliseconds.
|
||||||
|
@ -65,7 +65,7 @@ int main(void) {
|
||||||
*/
|
*/
|
||||||
while (true) {
|
while (true) {
|
||||||
if (!palReadPad(GPIOC, GPIOC_BUTTON))
|
if (!palReadPad(GPIOC, GPIOC_BUTTON))
|
||||||
TestThread(&SD2);
|
test_execute((BaseSequentialStream *)&SD2);
|
||||||
chThdSleepMilliseconds(500);
|
chThdSleepMilliseconds(500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
|
|
||||||
#include "chprintf.h"
|
#include "chprintf.h"
|
||||||
#include "shell.h"
|
#include "shell.h"
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
|
|
||||||
#include "chprintf.h"
|
#include "chprintf.h"
|
||||||
#include "shell.h"
|
#include "shell.h"
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Green LED blinker thread, times are in milliseconds.
|
* Green LED blinker thread, times are in milliseconds.
|
||||||
|
@ -65,7 +65,7 @@ int main(void) {
|
||||||
*/
|
*/
|
||||||
while (true) {
|
while (true) {
|
||||||
if (!palReadPad(GPIOC, GPIOC_BUTTON))
|
if (!palReadPad(GPIOC, GPIOC_BUTTON))
|
||||||
TestThread(&SD2);
|
test_execute((BaseSequentialStream *)&SD2);
|
||||||
chThdSleepMilliseconds(500);
|
chThdSleepMilliseconds(500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Blinker thread #1.
|
* Blinker thread #1.
|
||||||
|
@ -88,7 +88,7 @@ int main(void) {
|
||||||
*/
|
*/
|
||||||
while (true) {
|
while (true) {
|
||||||
if (palReadPad(GPIOA, GPIOA_BUTTON))
|
if (palReadPad(GPIOA, GPIOA_BUTTON))
|
||||||
TestThread(&SD1);
|
test_execute((BaseSequentialStream *)&SD1);
|
||||||
chThdSleepMilliseconds(500);
|
chThdSleepMilliseconds(500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Green LED blinker thread, times are in milliseconds.
|
* Green LED blinker thread, times are in milliseconds.
|
||||||
|
@ -65,7 +65,7 @@ int main(void) {
|
||||||
*/
|
*/
|
||||||
while (true) {
|
while (true) {
|
||||||
if (!palReadPad(GPIOC, GPIOC_BUTTON))
|
if (!palReadPad(GPIOC, GPIOC_BUTTON))
|
||||||
TestThread(&SD2);
|
test_execute((BaseSequentialStream *)&SD2);
|
||||||
chThdSleepMilliseconds(500);
|
chThdSleepMilliseconds(500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* LEDs blinker thread, times are in milliseconds.
|
* LEDs blinker thread, times are in milliseconds.
|
||||||
|
@ -69,7 +69,7 @@ int main(void) {
|
||||||
*/
|
*/
|
||||||
while (true) {
|
while (true) {
|
||||||
if (palReadLine(LINE_JOY_CENTER))
|
if (palReadLine(LINE_JOY_CENTER))
|
||||||
TestThread(&SD2);
|
test_execute((BaseSequentialStream *)&SD2);
|
||||||
chThdSleepMilliseconds(500);
|
chThdSleepMilliseconds(500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Green LED blinker thread, times are in milliseconds.
|
* Green LED blinker thread, times are in milliseconds.
|
||||||
|
@ -65,7 +65,7 @@ int main(void) {
|
||||||
*/
|
*/
|
||||||
while (true) {
|
while (true) {
|
||||||
if (!palReadLine(LINE_BUTTON))
|
if (!palReadLine(LINE_BUTTON))
|
||||||
TestThread(&SD2);
|
test_execute((BaseSequentialStream *)&SD2);
|
||||||
chThdSleepMilliseconds(500);
|
chThdSleepMilliseconds(500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
#include "shell.h"
|
#include "shell.h"
|
||||||
#include "chprintf.h"
|
#include "chprintf.h"
|
||||||
|
|
||||||
|
|
|
@ -93,6 +93,11 @@ typedef uint32_t ucnt_t; /**< Generic unsigned counter. */
|
||||||
*/
|
*/
|
||||||
#define PACKED_VAR __attribute__((packed))
|
#define PACKED_VAR __attribute__((packed))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Memory alignment enforcement for variables.
|
||||||
|
*/
|
||||||
|
#define ALIGNED_VAR(n) __attribute__((aligned(n)))
|
||||||
|
|
||||||
#endif /* CHTYPES_H */
|
#endif /* CHTYPES_H */
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
|
@ -93,6 +93,11 @@ typedef uint32_t ucnt_t; /**< Generic unsigned counter. */
|
||||||
*/
|
*/
|
||||||
#define PACKED_VAR __packed
|
#define PACKED_VAR __packed
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Memory alignment enforcement for variables.
|
||||||
|
*/
|
||||||
|
#define ALIGNED_VAR(n) __attribute__((aligned(n)))
|
||||||
|
|
||||||
#endif /* CHTYPES_H */
|
#endif /* CHTYPES_H */
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
|
@ -93,6 +93,11 @@ typedef uint32_t ucnt_t; /**< Generic unsigned counter. */
|
||||||
*/
|
*/
|
||||||
#define PACKED_VAR __packed
|
#define PACKED_VAR __packed
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Memory alignment enforcement for variables.
|
||||||
|
*/
|
||||||
|
#define ALIGNED_VAR(n) __attribute__((aligned(n)))
|
||||||
|
|
||||||
#endif /* CHTYPES_H */
|
#endif /* CHTYPES_H */
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
|
@ -105,6 +105,11 @@ typedef uint32_t ucnt_t; /**< Generic unsigned counter. */
|
||||||
*/
|
*/
|
||||||
#define PACKED_VAR __attribute__((packed))
|
#define PACKED_VAR __attribute__((packed))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Memory alignment enforcement for variables.
|
||||||
|
*/
|
||||||
|
#define ALIGNED_VAR(n) __attribute__((aligned(n)))
|
||||||
|
|
||||||
#endif /* CHTYPES_H */
|
#endif /* CHTYPES_H */
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
|
@ -88,6 +88,16 @@ typedef uint32_t ucnt_t; /**< Generic unsigned counter. */
|
||||||
*/
|
*/
|
||||||
#define PORT_THD_FUNCTION(tname, arg) void tname(void *arg)
|
#define PORT_THD_FUNCTION(tname, arg) void tname(void *arg)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Packed variable specifier.
|
||||||
|
*/
|
||||||
|
#define PACKED_VAR __attribute__((packed))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Memory alignment enforcement for variables.
|
||||||
|
*/
|
||||||
|
#define ALIGNED_VAR(n) __attribute__((aligned(n)))
|
||||||
|
|
||||||
#endif /* CHTYPES_H */
|
#endif /* CHTYPES_H */
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
|
@ -88,6 +88,16 @@ typedef uint32_t ucnt_t; /**< Generic unsigned counter. */
|
||||||
*/
|
*/
|
||||||
#define PORT_THD_FUNCTION(tname, arg) void tname(void *arg)
|
#define PORT_THD_FUNCTION(tname, arg) void tname(void *arg)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Packed variable specifier.
|
||||||
|
*/
|
||||||
|
#define PACKED_VAR __attribute__((packed))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Memory alignment enforcement for variables.
|
||||||
|
*/
|
||||||
|
#define ALIGNED_VAR(n) __attribute__((aligned(n)))
|
||||||
|
|
||||||
#endif /* CHTYPES_H */
|
#endif /* CHTYPES_H */
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
|
@ -22,7 +22,14 @@
|
||||||
*/
|
*/
|
||||||
MEMORY
|
MEMORY
|
||||||
{
|
{
|
||||||
flash : org = 0x08005000, len = 128k - 0x5000
|
flash0 : org = 0x08005000, len = 128k - 0x5000
|
||||||
|
flash1 : org = 0x00000000, len = 0
|
||||||
|
flash2 : org = 0x00000000, len = 0
|
||||||
|
flash3 : org = 0x00000000, len = 0
|
||||||
|
flash4 : org = 0x00000000, len = 0
|
||||||
|
flash5 : org = 0x00000000, len = 0
|
||||||
|
flash6 : org = 0x00000000, len = 0
|
||||||
|
flash7 : org = 0x00000000, len = 0
|
||||||
ram0 : org = 0x20000C00, len = 20k - 0xC00
|
ram0 : org = 0x20000C00, len = 20k - 0xC00
|
||||||
ram1 : org = 0x00000000, len = 0
|
ram1 : org = 0x00000000, len = 0
|
||||||
ram2 : org = 0x00000000, len = 0
|
ram2 : org = 0x00000000, len = 0
|
||||||
|
@ -33,8 +40,34 @@ MEMORY
|
||||||
ram7 : org = 0x00000000, len = 0
|
ram7 : org = 0x00000000, len = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* For each data/text section two region are defined, a virtual region
|
||||||
|
and a load region (_LMA suffix).*/
|
||||||
|
|
||||||
|
/* Flash region to be used for exception vectors.*/
|
||||||
|
REGION_ALIAS("VECTORS_FLASH", flash0);
|
||||||
|
REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
|
||||||
|
|
||||||
|
/* Flash region to be used for constructors and destructors.*/
|
||||||
|
REGION_ALIAS("XTORS_FLASH", flash0);
|
||||||
|
REGION_ALIAS("XTORS_FLASH_LMA", flash0);
|
||||||
|
|
||||||
|
/* Flash region to be used for code text.*/
|
||||||
|
REGION_ALIAS("TEXT_FLASH", flash0);
|
||||||
|
REGION_ALIAS("TEXT_FLASH_LMA", flash0);
|
||||||
|
|
||||||
|
/* Flash region to be used for read only data.*/
|
||||||
|
REGION_ALIAS("RODATA_FLASH", flash0);
|
||||||
|
REGION_ALIAS("RODATA_FLASH_LMA", flash0);
|
||||||
|
|
||||||
|
/* Flash region to be used for various.*/
|
||||||
|
REGION_ALIAS("VARIOUS_FLASH", flash0);
|
||||||
|
REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
|
||||||
|
|
||||||
|
/* Flash region to be used for RAM(n) initialization data.*/
|
||||||
|
REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
|
||||||
|
|
||||||
/* RAM region to be used for Main stack. This stack accommodates the processing
|
/* RAM region to be used for Main stack. This stack accommodates the processing
|
||||||
of all exceptions and interrupts*/
|
of all exceptions and interrupts.*/
|
||||||
REGION_ALIAS("MAIN_STACK_RAM", ram0);
|
REGION_ALIAS("MAIN_STACK_RAM", ram0);
|
||||||
|
|
||||||
/* RAM region to be used for the process stack. This is the stack used by
|
/* RAM region to be used for the process stack. This is the stack used by
|
||||||
|
@ -43,6 +76,7 @@ REGION_ALIAS("PROCESS_STACK_RAM", ram0);
|
||||||
|
|
||||||
/* RAM region to be used for data segment.*/
|
/* RAM region to be used for data segment.*/
|
||||||
REGION_ALIAS("DATA_RAM", ram0);
|
REGION_ALIAS("DATA_RAM", ram0);
|
||||||
|
REGION_ALIAS("DATA_RAM_LMA", flash0);
|
||||||
|
|
||||||
/* RAM region to be used for BSS segment.*/
|
/* RAM region to be used for BSS segment.*/
|
||||||
REGION_ALIAS("BSS_RAM", ram0);
|
REGION_ALIAS("BSS_RAM", ram0);
|
||||||
|
@ -50,4 +84,5 @@ REGION_ALIAS("BSS_RAM", ram0);
|
||||||
/* RAM region to be used for the default heap.*/
|
/* RAM region to be used for the default heap.*/
|
||||||
REGION_ALIAS("HEAP_RAM", ram0);
|
REGION_ALIAS("HEAP_RAM", ram0);
|
||||||
|
|
||||||
|
/* Generic rules inclusion.*/
|
||||||
INCLUDE rules.ld
|
INCLUDE rules.ld
|
||||||
|
|
|
@ -136,12 +136,12 @@ static void serve_interrupt(SerialDriver *sdp) {
|
||||||
case IIR_SRC_TIMEOUT:
|
case IIR_SRC_TIMEOUT:
|
||||||
case IIR_SRC_RX:
|
case IIR_SRC_RX:
|
||||||
osalSysLockFromISR();
|
osalSysLockFromISR();
|
||||||
if (chIQIsEmptyI(&sdp->iqueue))
|
if (iqIsEmptyI(&sdp->iqueue))
|
||||||
chnAddFlagsI(sdp, CHN_INPUT_AVAILABLE);
|
chnAddFlagsI(sdp, CHN_INPUT_AVAILABLE);
|
||||||
osalSysUnlockFromISR();
|
osalSysUnlockFromISR();
|
||||||
while (u->UART_LSR & LSR_RBR_FULL) {
|
while (u->UART_LSR & LSR_RBR_FULL) {
|
||||||
osalSysLockFromISR();
|
osalSysLockFromISR();
|
||||||
if (chIQPutI(&sdp->iqueue, u->UART_RBR) < MSG_OK)
|
if (iqPutI(&sdp->iqueue, u->UART_RBR) < MSG_OK)
|
||||||
chnAddFlagsI(sdp, SD_OVERRUN_ERROR);
|
chnAddFlagsI(sdp, SD_OVERRUN_ERROR);
|
||||||
osalSysUnlockFromISR();
|
osalSysUnlockFromISR();
|
||||||
}
|
}
|
||||||
|
@ -153,7 +153,7 @@ static void serve_interrupt(SerialDriver *sdp) {
|
||||||
msg_t b;
|
msg_t b;
|
||||||
|
|
||||||
osalSysLockFromISR();
|
osalSysLockFromISR();
|
||||||
b = chOQGetI(&sdp->oqueue);
|
b = oqGetI(&sdp->oqueue);
|
||||||
osalSysUnlockFromISR();
|
osalSysUnlockFromISR();
|
||||||
if (b < MSG_OK) {
|
if (b < MSG_OK) {
|
||||||
u->UART_IER &= ~IER_THRE;
|
u->UART_IER &= ~IER_THRE;
|
||||||
|
@ -182,7 +182,7 @@ static void preload(SerialDriver *sdp) {
|
||||||
if (u->UART_LSR & LSR_THRE) {
|
if (u->UART_LSR & LSR_THRE) {
|
||||||
int i = LPC214x_UART_FIFO_PRELOAD;
|
int i = LPC214x_UART_FIFO_PRELOAD;
|
||||||
do {
|
do {
|
||||||
msg_t b = chOQGetI(&sdp->oqueue);
|
msg_t b = oqGetI(&sdp->oqueue);
|
||||||
if (b < MSG_OK) {
|
if (b < MSG_OK) {
|
||||||
chnAddFlagsI(sdp, CHN_OUTPUT_EMPTY);
|
chnAddFlagsI(sdp, CHN_OUTPUT_EMPTY);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
#include "chprintf.h"
|
#include "chprintf.h"
|
||||||
|
|
||||||
#if (SHELL_CMD_TEST_ENABLED == TRUE) || defined(__DOXYGEN__)
|
#if (SHELL_CMD_TEST_ENABLED == TRUE) || defined(__DOXYGEN__)
|
||||||
#include "test.h"
|
#include "ch_test.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
@ -181,7 +181,7 @@ static void cmd_test(BaseSequentialStream *chp, int argc, char *argv[]) {
|
||||||
}
|
}
|
||||||
tp = chThdCreateFromHeap(NULL, SHELL_CMD_TEST_WA_SIZE,
|
tp = chThdCreateFromHeap(NULL, SHELL_CMD_TEST_WA_SIZE,
|
||||||
"test", chThdGetPriorityX(),
|
"test", chThdGetPriorityX(),
|
||||||
TestThread, chp);
|
(tfunc_t)test_execute, chp);
|
||||||
if (tp == NULL) {
|
if (tp == NULL) {
|
||||||
chprintf(chp, "out of memory\r\n");
|
chprintf(chp, "out of memory\r\n");
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -39,6 +39,11 @@
|
||||||
*/
|
*/
|
||||||
unsigned test_step;
|
unsigned test_step;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Test result flag.
|
||||||
|
*/
|
||||||
|
bool test_global_fail;
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Module local types. */
|
/* Module local types. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
@ -48,7 +53,6 @@ unsigned test_step;
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
static bool test_local_fail;
|
static bool test_local_fail;
|
||||||
static bool test_global_fail;
|
|
||||||
static const char *test_failure_message;
|
static const char *test_failure_message;
|
||||||
static char test_tokens_buffer[TEST_MAX_TOKENS];
|
static char test_tokens_buffer[TEST_MAX_TOKENS];
|
||||||
static char *test_tokp;
|
static char *test_tokp;
|
||||||
|
@ -74,7 +78,7 @@ static void execute_test(const testcase_t *tcp) {
|
||||||
|
|
||||||
/* Initialization */
|
/* Initialization */
|
||||||
clear_tokens();
|
clear_tokens();
|
||||||
test_local_fail = FALSE;
|
test_local_fail = false;
|
||||||
|
|
||||||
if (tcp->setup != NULL)
|
if (tcp->setup != NULL)
|
||||||
tcp->setup();
|
tcp->setup();
|
||||||
|
@ -97,17 +101,17 @@ static void print_line(void) {
|
||||||
|
|
||||||
bool _test_fail(const char *msg) {
|
bool _test_fail(const char *msg) {
|
||||||
|
|
||||||
test_local_fail = TRUE;
|
test_local_fail = true;
|
||||||
test_global_fail = TRUE;
|
test_global_fail = true;
|
||||||
test_failure_message = msg;
|
test_failure_message = msg;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool _test_assert(bool condition, const char *msg) {
|
bool _test_assert(bool condition, const char *msg) {
|
||||||
|
|
||||||
if (!condition)
|
if (!condition)
|
||||||
return _test_fail(msg);
|
return _test_fail(msg);
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool _test_assert_sequence(char *expected, const char *msg) {
|
bool _test_assert_sequence(char *expected, const char *msg) {
|
||||||
|
@ -123,7 +127,7 @@ bool _test_assert_sequence(char *expected, const char *msg) {
|
||||||
|
|
||||||
clear_tokens();
|
clear_tokens();
|
||||||
|
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool _test_assert_time_window(systime_t start,
|
bool _test_assert_time_window(systime_t start,
|
||||||
|
@ -215,8 +219,8 @@ void test_emit_token_i(char token) {
|
||||||
* @param[in] stream pointer to a @p BaseSequentialStream object for test
|
* @param[in] stream pointer to a @p BaseSequentialStream object for test
|
||||||
* output
|
* output
|
||||||
* @return A failure boolean value casted to @p msg_t.
|
* @return A failure boolean value casted to @p msg_t.
|
||||||
* @retval FALSE if no errors occurred.
|
* @retval false if no errors occurred.
|
||||||
* @retval TRUE if one or more tests failed.
|
* @retval true if one or more tests failed.
|
||||||
*
|
*
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
|
@ -246,7 +250,7 @@ msg_t test_execute(BaseSequentialStream *stream) {
|
||||||
#endif
|
#endif
|
||||||
test_println("");
|
test_println("");
|
||||||
|
|
||||||
test_global_fail = FALSE;
|
test_global_fail = false;
|
||||||
i = 0;
|
i = 0;
|
||||||
while (test_suite[i]) {
|
while (test_suite[i]) {
|
||||||
j = 0;
|
j = 0;
|
||||||
|
|
|
@ -156,6 +156,7 @@ typedef struct {
|
||||||
|
|
||||||
#if !defined(__DOXYGEN__)
|
#if !defined(__DOXYGEN__)
|
||||||
extern unsigned test_step;
|
extern unsigned test_step;
|
||||||
|
extern bool test_global_fail;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
Loading…
Reference in New Issue