diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-12-04 03:19:59 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-12-04 03:19:59 +0000 |
commit | 01fab0c78eeef5461a896847f05caec51d26050f (patch) | |
tree | 1a500c7a38318a2d9ee6b40655863d4726c1f2f8 /nuttx/graphics/nxmu/nxmu_kbdin.c | |
parent | 6f348a7102c32164dd7fcc9008bdbd8a810fc5b7 (diff) | |
download | px4-nuttx-01fab0c78eeef5461a896847f05caec51d26050f.tar.gz px4-nuttx-01fab0c78eeef5461a896847f05caec51d26050f.tar.bz2 px4-nuttx-01fab0c78eeef5461a896847f05caec51d26050f.zip |
Enable keypad input
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1411 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/graphics/nxmu/nxmu_kbdin.c')
-rw-r--r-- | nuttx/graphics/nxmu/nxmu_kbdin.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/nuttx/graphics/nxmu/nxmu_kbdin.c b/nuttx/graphics/nxmu/nxmu_kbdin.c index 35af516ae..903533357 100644 --- a/nuttx/graphics/nxmu/nxmu_kbdin.c +++ b/nuttx/graphics/nxmu/nxmu_kbdin.c @@ -40,6 +40,7 @@ #include <nuttx/config.h> #include <sys/types.h> +#include <stdlib.h> #include <errno.h> #include <debug.h> @@ -82,10 +83,9 @@ * ****************************************************************************/ -void nxmu_kbdin(FAR struct nxs_server_s *svr, ubyte nch, ubyte *ch) +void nxmu_kbdin(FAR struct nxfe_state_s *fe, ubyte nch, FAR ubyte *ch) { - struct nxbe_window_s *wnd; - FAR struct nxclimgs_kbdin_s *outmsg; + FAR struct nxclimsg_kbdin_s *outmsg; int size; int ret; int i; @@ -94,22 +94,22 @@ void nxmu_kbdin(FAR struct nxs_server_s *svr, ubyte nch, ubyte *ch) * character data. */ - size = sizeof(struct nxclimgs_kbdin_s) + nch - 1; - outmsg = (FAR struct nxclimgs_kbdin_s *)malloc(size); + size = sizeof(struct nxclimsg_kbdin_s) + nch - 1; + outmsg = (FAR struct nxclimsg_kbdin_s *)malloc(size); if (outmsg) { /* Give the keypad input only to the top child */ - outsg->msgid = NX_SVRMSG_KBDIN; - outmsg->wnd = svr->topwnd; - outmsg->nch = nch; + outmsg->msgid = NX_CLIMSG_KBDIN; + outmsg->wnd = fe->be.topwnd; + outmsg->nch = nch; - for (i = 0; i < nch; i+) + for (i = 0; i < nch; i++) { outmsg->ch[i] = ch[i]; } - ret = mq_send(svr->topwnd->conn->swrmq, outmsg, size, NX_SVRMSG_PRIO); + ret = mq_send(fe->be.topwnd->conn->swrmq, outmsg, size, NX_SVRMSG_PRIO); if (ret < 0) { gdbg("mq_send failed: %d\n", errno); |