park.borne.impl
Class ClavierImpl
java.lang.Object
|
+--park.borne.impl.ClavierImpl
- public final class ClavierImpl
- extends java.lang.Object
*
configuration du clavier connecté sur PCF8474
*
* C1
C2 C3 C4
* L1 _____|1____|2____|3____|a___ PA0 1
0 0 0 1 1 1 1 1 1 1
1 0 1 1 1
*
* L2 _____|4____|5____|6____|b___ PA1 1
1 1 1 0 0 0 1 1 1 1
1 1 0 1 1
*
* L3 _____|7____|8____|9____|c___ PA2 1
1 1 1 1 1 1 0 0 0 1
1 1 1 0 1
*
* L4 _____|*____|0____|#____|d___ PA3 0
1 1 1 1 1 1 1 1 1 0
0 1 1 1 0
* |
| | |
----------------------------------------------
* |_____|_____|_____|____
PA4 1 0 1 1 0 1 1
0 1 1 0 1 1 1 1 1
*
| | |
*
|_____|_____|____ PA5 0 1 0 1 1
0 1 1 0 1 1 1 1 1 1
1
*
| |
*
| ____|____ PA6 1 1 1 0 1
1 0 1 1 0 1 0 1 1 1
1
*
|
*
|____ PA7 1 1 1 1 1 1
1 1 1 1 1 1 0 0 0 0
*
----------------------------------------------
*
0 1 2 3 4 5 6 7 8 9
# a b c d
* codes hexa
D7 EE DE BE ED DD BD EB DB BB E7 B7 7E 7D 7B 77
*
* 0..# : clavier 3 X 4
* b : appel gardien
* a, c, d : non utilises
*
* *****************************************************************************
* Methode utilisée: inversion lignes <-> colonnes
* *****************************************************************************
* ecrire 0xF0
* lecture ligne
* si (ligne[1] != MASQUELIGNES)
// si touche appuyée
* {
// détemination du code de la touche
* ecrire 0x0F
* lecture colonne
* code = (byte)(((byte)ligne[1]) | ((byte)colonne[1]));
* }
* sinon code = PASDAPPUI;
*
* ecriture 0111 0000
* & 0110 0111 touche 1
* ---------
* ligne = 0110 0000
*
* ecriture 0000 1111
* & 0110 0111 touche 1
* ---------
* colonne = 0000 0111
*
* code de la touche = ligne | colonne = 0110 0111
Field Summary |
static byte[][] |
TableCodes
transcodage
code geographique -> code touche |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TableCodes
public static final byte[][] TableCodes
- transcodage
code geographique -> code touche
ClavierImpl
public ClavierImpl()
init
public void init()
throws PortException
kill
public void kill()
readClavier
public byte readClavier()
scan
public byte scan()
getCodeTouche
public static byte getCodeTouche(byte codeGeo)