aboutsummaryrefslogtreecommitdiffstats
path: root/test/test.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-05-02 20:15:04 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-05-02 20:15:04 +0000
commita8df5dfb84dc37224222520ead47d4cef40ebd9f (patch)
tree80ee9e090b25cc5b12eb471894b6288ea14c59f5 /test/test.c
parent83cafc020df7f7a3b857a23aff93849eac694ea2 (diff)
downloadChibiOS-a8df5dfb84dc37224222520ead47d4cef40ebd9f.tar.gz
ChibiOS-a8df5dfb84dc37224222520ead47d4cef40ebd9f.tar.bz2
ChibiOS-a8df5dfb84dc37224222520ead47d4cef40ebd9f.zip
Modified the test suite to work with a generic channel rather than with a serial driver.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@939 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'test/test.c')
-rw-r--r--test/test.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/test/test.c b/test/test.c
index 79b2202ac..071641274 100644
--- a/test/test.c
+++ b/test/test.c
@@ -64,33 +64,33 @@ Thread *threads[MAX_THREADS];
/*
* Console output.
*/
-static FullDuplexDriver *comp;
+static BaseChannel *chp;
void test_printn(uint32_t n) {
char buf[16], *p;
if (!n)
- chIOPut(comp, '0');
+ chIOPut(chp, '0');
else {
p = buf;
while (n)
*p++ = (n % 10) + '0', n /= 10;
while (p > buf)
- chIOPut(comp, *--p);
+ chIOPut(chp, *--p);
}
}
void test_print(char *msgp) {
while (*msgp)
- chIOPut(comp, *msgp++);
+ chIOPut(chp, *msgp++);
}
void test_println(char *msgp) {
test_print(msgp);
- chIOPut(comp, '\r');
- chIOPut(comp, '\n');
+ chIOPut(chp, '\r');
+ chIOPut(chp, '\n');
}
/*
@@ -105,7 +105,7 @@ static void print_tokens(void) {
char *cp = tokens_buffer;
while (cp < tokp)
- chIOPut(comp, *cp++);
+ chIOPut(chp, *cp++);
}
void test_emit_token(char token) {
@@ -232,15 +232,15 @@ static void print_line(void) {
unsigned i;
for (i = 0; i < 76; i++)
- chIOPut(comp, '-');
- chIOPut(comp, '\r');
- chIOPut(comp, '\n');
+ chIOPut(chp, '-');
+ chIOPut(chp, '\r');
+ chIOPut(chp, '\n');
}
msg_t TestThread(void *p) {
int i, j;
- comp = p;
+ chp = p;
test_println("");
test_println("*** ChibiOS/RT test suite");
test_println("***");