diff options
author | Joel Sherrill <joel.sherrill@oarcorp.com> | 2014-10-09 15:35:10 -0500 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@oarcorp.com> | 2014-10-10 10:17:33 -0500 |
commit | ef4c4612e2c21feae24c0ea47a83942cbcebc465 (patch) | |
tree | a5415da86f64e02c33a54c9da7dcf134762c0be1 /c/src/lib/libbsp/arm/nds/touchscreen | |
parent | powerpc/ep1a: Remove if 0 sections (diff) | |
download | rtems-ef4c4612e2c21feae24c0ea47a83942cbcebc465.tar.bz2 |
arm/nds: Warning clean up
This patch eliminates most of the warnings in this BSP but attempts
very little clean up. This BSP includes copies of a lot of code
from free NDS libraries and modifications should be kept to a minimum.
Diffstat (limited to 'c/src/lib/libbsp/arm/nds/touchscreen')
-rw-r--r-- | c/src/lib/libbsp/arm/nds/touchscreen/parser.c | 12 | ||||
-rw-r--r-- | c/src/lib/libbsp/arm/nds/touchscreen/reco.c | 13 |
2 files changed, 20 insertions, 5 deletions
diff --git a/c/src/lib/libbsp/arm/nds/touchscreen/parser.c b/c/src/lib/libbsp/arm/nds/touchscreen/parser.c index c89267e87e..b103c615d1 100644 --- a/c/src/lib/libbsp/arm/nds/touchscreen/parser.c +++ b/c/src/lib/libbsp/arm/nds/touchscreen/parser.c @@ -22,6 +22,8 @@ */ extern void console_push (char c); +extern void register_kbd_msg_queue (char *q_name); +extern void unregister_kbd_msg_queue (void); /* * from reco.c @@ -32,7 +34,8 @@ extern char PA_CheckLetter (int down, int x, int y); /* * message queue for touchscreen and graffiti events. */ - +extern void register_mou_msg_queue (char *q_name); +extern void unregister_mou_msg_queue (void); static rtems_id mou_queue_id = 0; static rtems_id kbd_queue_id = 0; @@ -51,9 +54,14 @@ static int old_btns = 0; static int hand = 0; /* - * update touchscreen position. + * Shared methods */ +void update_touchscreen (void); +void touchscreen_sethand (int h); +/* + * update touchscreen position + */ void update_touchscreen (void) { diff --git a/c/src/lib/libbsp/arm/nds/touchscreen/reco.c b/c/src/lib/libbsp/arm/nds/touchscreen/reco.c index 08f4f8b36c..540720038f 100644 --- a/c/src/lib/libbsp/arm/nds/touchscreen/reco.c +++ b/c/src/lib/libbsp/arm/nds/touchscreen/reco.c @@ -1,6 +1,13 @@ #include <nds.h> #include "reco.h" +/* + * Prototype + * + * NOTE: These appear to be part of a public interface. + */ +char PA_CheckLetter(int down, int x, int y); + PA_StylusPosition PA_StylusPos[20000]; PA_RecoValues PA_Reco; @@ -60,7 +67,7 @@ PA_FormType PA_Graffiti[PA_RECOTESTS] = { -void PA_AddStylusPos(u8 x, u8 y){ +static void PA_AddStylusPos(u8 x, u8 y){ if (!((x == PA_StylusPos[PA_Reco.nvalues-1].x) && (y == PA_StylusPos[PA_Reco.nvalues-1].y))){ PA_StylusPos[PA_Reco.nvalues].x = x; PA_StylusPos[PA_Reco.nvalues].y = y; @@ -69,7 +76,7 @@ void PA_AddStylusPos(u8 x, u8 y){ } -void PA_StylusLine(u8 x1, u8 y1, u8 x2, u8 y2){ +static void PA_StylusLine(u8 x1, u8 y1, u8 x2, u8 y2){ int i,dx,dy,sdx,sdy,dxabs,dyabs,x,y,px,py; dx=x2-x1; /* the horizontal distance of the line */ @@ -130,7 +137,7 @@ void PA_StylusLine(u8 x1, u8 y1, u8 x2, u8 y2){ -char PA_AnalyzeShape(void){ +static char PA_AnalyzeShape(void){ s32 i; // for (i = 0; i < 32; i++) PA_OutputSimpleText(1, 0, i, " "); |