git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@977 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
gdisirio 2009-05-16 12:37:01 +00:00
parent dd6e2f3911
commit b20088a8cb
4 changed files with 17 additions and 6 deletions

View File

@ -57,15 +57,26 @@ static unsigned failpoint;
static char tokens_buffer[MAX_TOKENS];
static char *tokp;
/*
* Static working areas, the following areas can be used for threads or
* used as temporary buffers.
*/
WORKING_AREA(waT0, THREADS_STACK_SIZE);
WORKING_AREA(waT1, THREADS_STACK_SIZE);
WORKING_AREA(waT2, THREADS_STACK_SIZE);
WORKING_AREA(waT3, THREADS_STACK_SIZE);
WORKING_AREA(waT4, THREADS_STACK_SIZE);
void *wa[MAX_THREADS] = {waT0, waT1, waT2, waT3, waT4};
/*
* Pointers to the spawned threads.
*/
Thread *threads[MAX_THREADS];
/*
* Pointers to the working areas.
*/
void * const wa[5] = {waT0, waT1, waT2, waT3, waT4};
/*
* Console output.
*/

View File

@ -94,12 +94,12 @@ extern "C" {
}
extern Thread *threads[MAX_THREADS];
extern void *wa[MAX_THREADS];
extern WORKING_AREA(waT0, THREADS_STACK_SIZE);
extern WORKING_AREA(waT1, THREADS_STACK_SIZE);
extern WORKING_AREA(waT2, THREADS_STACK_SIZE);
extern WORKING_AREA(waT3, THREADS_STACK_SIZE);
extern WORKING_AREA(waT4, THREADS_STACK_SIZE);
extern void * const wa[];
extern bool_t test_timer_done;
#endif /* _TEST_H_ */

View File

@ -196,7 +196,7 @@ static void serial2_execute(void) {
dflags_t flags;
/* Asynchronous test using the direct APIs.*/
n = chFDDWrite(&fdd, "ABCDEFGH", TEST_QUEUES_SIZE);
n = chFDDWrite(&fdd, (uint8_t *)"ABCDEFGH", TEST_QUEUES_SIZE);
test_assert(1, n == TEST_QUEUES_SIZE, "unexpected write condition");
n = chFDDRead(&fdd, wa[1], TEST_QUEUES_SIZE);
test_assert(2, n == TEST_QUEUES_SIZE, "unexpected read condition");
@ -206,7 +206,7 @@ static void serial2_execute(void) {
test_assert(4, flags == 0, "unexpected error condition");
/* Input overflow testing.*/
n = chFDDWrite(&fdd, "ABCDEFGH", TEST_QUEUES_SIZE);
n = chFDDWrite(&fdd, (uint8_t *)"ABCDEFGH", TEST_QUEUES_SIZE);
test_assert(5, n == TEST_QUEUES_SIZE, "unexpected write condition");
/* The following operation will fail to loopback because the input queue
* is full.*/
@ -217,7 +217,7 @@ static void serial2_execute(void) {
test_assert(7, n == TEST_QUEUES_SIZE, "unexpected read condition");
/* Asynchronous test using the channel APIs.*/
n = chIOWrite(&fdd, "ABCDEFGH", TEST_QUEUES_SIZE);
n = chIOWrite(&fdd, (uint8_t *)"ABCDEFGH", TEST_QUEUES_SIZE);
test_assert(8, n == TEST_QUEUES_SIZE, "unexpected write condition");
n = chIORead(&fdd, wa[1], TEST_QUEUES_SIZE);
test_assert(9, n == TEST_QUEUES_SIZE, "unexpected read condition");

View File

@ -9,7 +9,7 @@ After 1.2.0:
? Move the serial drivers implementations in library. Better keep the core
as compact as possible.
* Add tests documentation to the general documentation via doxygen.
* Static object initializers.
X Static object initializers.
- Remove any instance of unnamed structures/unions.
- Objects registry in the kernel.
- OSEK-style simple tasks within the idle thread.