projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Drop almost all the Qt3 cruft.
[bertos.git]
/
hw
/
hw_kbd.h
diff --git
a/hw/hw_kbd.h
b/hw/hw_kbd.h
index 8908db2786a8e98e4d143d22cec5ad8d92125c37..c4f684b82019cc417ecec6fec14ec8d7e4819a7a 100755
(executable)
--- a/
hw/hw_kbd.h
+++ b/
hw/hw_kbd.h
@@
-16,6
+16,12
@@
/*#*
*#* $Log$
/*#*
*#* $Log$
+ *#* Revision 1.3 2006/03/22 09:51:27 bernie
+ *#* Wrap C++ stuff.
+ *#*
+ *#* Revision 1.2 2006/02/15 09:13:42 bernie
+ *#* Add keyboard emulator.
+ *#*
*#* Revision 1.1 2006/02/10 12:31:03 bernie
*#* Add templates for hw definitions.
*#*
*#* Revision 1.1 2006/02/10 12:31:03 bernie
*#* Add templates for hw definitions.
*#*
@@
-24,46
+30,24
@@
#ifndef HW_KBD_H
#define HW_KBD_H
#ifndef HW_KBD_H
#define HW_KBD_H
-
#include "kbd_map.h"
#include <cfg/macros.h>
#include "kbd_map.h"
#include <cfg/macros.h>
-#include <cfg/debug.h>
-
-
- /*!
- * \name CPU ports <-> switches assignement
- * @{
- */
#define K_RPT_MASK (K_UP | K_DOWN | K_OK | K_CANCEL)
#define K_RPT_MASK (K_UP | K_DOWN | K_OK | K_CANCEL)
-/*@}*/
-
#define KBD_HW_INIT \
do { \
} while (0)
#define KBD_HW_INIT \
do { \
} while (0)
+EXTERN_C int emul_kbdReadCols(void);
-/*
!
+/*
*
* Read the keyboard ports and return the mask of
* depressed keys.
*/
INLINE keymask_t kbd_readkeys(void)
{
* Read the keyboard ports and return the mask of
* depressed keys.
*/
INLINE keymask_t kbd_readkeys(void)
{
- keymask_t key = 0;
-
- uint32_t mask = 0xF;
-
- if (!(mask & 1))
- key |= K_OK;
- if (!(mask & 2))
- key |= K_CANCEL;
- if (!(mask & 4))
- key |= K_UP;
- if (!(mask & 8))
- key |= K_DOWN;
-
- return key;
+ return (keymask_t)emul_kbdReadCols();
}
#endif /* HW_KBD_H */
}
#endif /* HW_KBD_H */