#include <keyboard.h>


Public Member Functions | |
| void | SetNewValueFromUi (const std::string &) |
| virtual int | Step (bool &trueHwStep, SystemClockOffset *timeToNextStepIn_ns=0) |
| Return nonzero if a breakpoint was hit. | |
| Keyboard (UserInterface *, const char *name, const char *baseWindow) | |
| void | SetClockFreq (SystemClockOffset f) |
| virtual | ~Keyboard () |
Protected Member Functions | |
| void | InsertMakeCodeToBuffer (int) |
| void | InsertBreakCodeToBuffer (int) |
| int | InsertScanCodeToBuffer (unsigned char scan) |
Protected Attributes | |
| unsigned char | myPortValue |
| Pin | clk |
| Pin | data |
| unsigned int | bitCnt |
| SystemClockOffset | myClockFreq |
| unsigned int | buffer [KBD_BUFFER_SIZE] |
| unsigned int | bufferWriteIndex |
| unsigned int | bufferReadIndex |
| unsigned char | actualChar |
| unsigned char | lastPortValue |
A PS2-style keyboard sending scan-codes obtained from UI to pins on device (I guess).
Definition at line 41 of file keyboard.h.
| Keyboard::Keyboard | ( | UserInterface * | ui, | |
| const char * | name, | |||
| const char * | baseWindow | |||
| ) |
Definition at line 182 of file keyboard.cpp.
References UserInterface::AddExternalType(), bitCnt, lastPortValue, myPortValue, and UserInterface::Write().

| Keyboard::~Keyboard | ( | ) | [virtual] |
Definition at line 200 of file keyboard.cpp.
| void Keyboard::InsertBreakCodeToBuffer | ( | int | key | ) | [protected] |
Definition at line 229 of file keyboard.cpp.
References InsertScanCodeToBuffer(), keynumberToScancode2, and xToNumber.
Referenced by SetNewValueFromUi().


| void Keyboard::InsertMakeCodeToBuffer | ( | int | key | ) | [protected] |
Definition at line 214 of file keyboard.cpp.
References InsertScanCodeToBuffer(), keynumberToScancode2, and xToNumber.
Referenced by SetNewValueFromUi().


| int Keyboard::InsertScanCodeToBuffer | ( | unsigned char | scan | ) | [protected] |
Definition at line 206 of file keyboard.cpp.
References buffer, bufferReadIndex, bufferWriteIndex, and KBD_BUFFER_SIZE.
Referenced by InsertBreakCodeToBuffer(), and InsertMakeCodeToBuffer().

| void Keyboard::SetClockFreq | ( | SystemClockOffset | f | ) |
Definition at line 202 of file keyboard.cpp.
References myClockFreq.
| void Keyboard::SetNewValueFromUi | ( | const std::string & | s | ) | [virtual] |
Implements ExternalType.
Definition at line 254 of file keyboard.cpp.
References InsertBreakCodeToBuffer(), and InsertMakeCodeToBuffer().

| int Keyboard::Step | ( | bool & | trueHwStep, | |
| SystemClockOffset * | timeToNextStepIn_ns = 0 | |||
| ) | [virtual] |
Return nonzero if a breakpoint was hit.
Implements SimulationMember.
Definition at line 43 of file keyboard.cpp.
References actualChar, avr_error, bitCnt, buffer, bufferReadIndex, bufferWriteIndex, clk, data, IDLE, KBD_BUFFER_SIZE, lastPortValue, myClockFreq, and myPortValue.
unsigned char Keyboard::actualChar [protected] |
Definition at line 60 of file keyboard.h.
Referenced by Step().
unsigned int Keyboard::bitCnt [protected] |
Definition at line 47 of file keyboard.h.
Referenced by Keyboard(), and Step().
unsigned int Keyboard::buffer[KBD_BUFFER_SIZE] [protected] |
Definition at line 52 of file keyboard.h.
Referenced by InsertScanCodeToBuffer(), and Step().
unsigned int Keyboard::bufferReadIndex [protected] |
Definition at line 54 of file keyboard.h.
Referenced by InsertScanCodeToBuffer(), and Step().
unsigned int Keyboard::bufferWriteIndex [protected] |
Definition at line 53 of file keyboard.h.
Referenced by InsertScanCodeToBuffer(), and Step().
Pin Keyboard::clk [protected] |
Definition at line 44 of file keyboard.h.
Referenced by Step().
Pin Keyboard::data [protected] |
Definition at line 45 of file keyboard.h.
Referenced by Step().
unsigned char Keyboard::lastPortValue [protected] |
Definition at line 61 of file keyboard.h.
Referenced by Keyboard(), and Step().
SystemClockOffset Keyboard::myClockFreq [protected] |
Definition at line 50 of file keyboard.h.
Referenced by SetClockFreq(), and Step().
unsigned char Keyboard::myPortValue [protected] |
Definition at line 43 of file keyboard.h.
Referenced by Keyboard(), and Step().
1.6.3