gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Enumerations | Functions | Variables
Ps2 Namespace Reference

Enumerations

enum  {
  Ps2Reset = 0xff, SelfTestPass = 0xAA, SetStatusLed = 0xed, SetResolution = 0xe8,
  StatusRequest = 0xe9, SetScaling1_2 = 0xe7, SetScaling1_1 = 0xe6, ReadId = 0xf2,
  TpReadId = 0xe1, Ack = 0xfa, SetRate = 0xf3, Enable = 0xf4,
  Disable = 0xf5, SetDefaults = 0xf6, KeyboardId = 0xab, TouchKitId = 0x0a,
  MouseId = 0x00
}
 

Functions

void keySymToPs2 (uint32_t key, bool down, bool &cur_shift, std::list< uint8_t > &keys)
 
 BitUnion8 (Ps2MouseMovement) Bitfield< 0 > leftButton
 A bitfield that represents the first byte of a mouse movement packet. More...
 
 EndBitUnion (Ps2MouseMovement) void keySymToPs2(uint32_t key
 Convert an x11 key symbol into a set of ps2 charecters. More...
 

Variables

static const uint16_t keySymToPs2Byte [128]
 Table to convert simple key symbols (0x00XX) into ps2 bytes. More...
 
const uint8_t ShiftKey = 0x12
 
const uint8_t BreakKey = 0xf0
 
const uint8_t ExtendedKey = 0xe0
 
const uint32_t UpperKeys = 0xff00
 
Bitfield< 1 > rightButton
 
Bitfield< 2 > middleButton
 
Bitfield< 3 > one
 
Bitfield< 4 > xSign
 
Bitfield< 5 > ySign
 
Bitfield< 6 > xOverflow
 
Bitfield< 7 > yOverflow
 
bool down
 
bool bool & cur_shift
 
bool bool std::list< uint8_t > & keys
 

Enumeration Type Documentation

anonymous enum
Enumerator
Ps2Reset 
SelfTestPass 
SetStatusLed 
SetResolution 
StatusRequest 
SetScaling1_2 
SetScaling1_1 
ReadId 
TpReadId 
Ack 
SetRate 
Enable 
Disable 
SetDefaults 
KeyboardId 
TouchKitId 
MouseId 

Definition at line 53 of file ps2.hh.

Function Documentation

Ps2::BitUnion8 ( Ps2MouseMovement  )

A bitfield that represents the first byte of a mouse movement packet.

Ps2::EndBitUnion ( Ps2MouseMovement  )

Convert an x11 key symbol into a set of ps2 charecters.

Parameters
keyx11 key symbol
downif the key is being pressed or released
cur_shiftif device has already sent a shift
keyslist of keys command to send to emulate the x11 key symbol
void Ps2::keySymToPs2 ( uint32_t  key,
bool  down,
bool &  cur_shift,
std::list< uint8_t > &  keys 
)

Definition at line 82 of file ps2.cc.

References BreakKey, ExtendedKey, keySymToPs2Byte, ArmISA::shift, ShiftKey, UpperKeys, and warn.

Referenced by Pl050::keyPress().

Variable Documentation

const uint8_t Ps2::BreakKey = 0xf0

Definition at line 77 of file ps2.cc.

Referenced by keySymToPs2().

bool bool& Ps2::cur_shift

Definition at line 92 of file ps2.hh.

bool Ps2::down

Definition at line 92 of file ps2.hh.

const uint8_t Ps2::ExtendedKey = 0xe0

Definition at line 78 of file ps2.cc.

Referenced by keySymToPs2().

bool bool std::list<uint8_t>& Ps2::keys

Definition at line 92 of file ps2.hh.

Referenced by Pl050::keyPress().

const uint16_t Ps2::keySymToPs2Byte[128]
static
Initial value:
= {
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0029, 0x0116, 0x0152, 0x0126, 0x0125, 0x012e, 0x013d, 0x0052,
0x0146, 0x0145, 0x013e, 0x0155, 0x0041, 0x004e, 0x0049, 0x004a,
0x0045, 0x0016, 0x001e, 0x0026, 0x0025, 0x002e, 0x0036, 0x003d,
0x003e, 0x0046, 0x014c, 0x004c, 0x0141, 0x0055, 0x0149, 0x014a,
0x011e, 0x011c, 0x0132, 0x0121, 0x0123, 0x0124, 0x012b, 0x0134,
0x0133, 0x0143, 0x013b, 0x0142, 0x014b, 0x013a, 0x0131, 0x0144,
0x014d, 0x0115, 0x012d, 0x011b, 0x012c, 0x013c, 0x012a, 0x011d,
0x0122, 0x0135, 0x011a, 0x0054, 0x005d, 0x005b, 0x0136, 0x014e,
0x000e, 0x001c, 0x0032, 0x0021, 0x0023, 0x0024, 0x002b, 0x0034,
0x0033, 0x0043, 0x003b, 0x0042, 0x004b, 0x003a, 0x0031, 0x0044,
0x004d, 0x0015, 0x002d, 0x001b, 0x002c, 0x003c, 0x002a, 0x001d,
0x0022, 0x0035, 0x001a, 0x0154, 0x015d, 0x015b, 0x010e, 0x0000
}

Table to convert simple key symbols (0x00XX) into ps2 bytes.

Lower byte is the scan code to send and upper byte is if a modifier is required to generate it. The table generates us keyboard codes, (e.g. the guest is supposed to recognize the keyboard as en_US). A new table would be required for another locale.

Definition at line 56 of file ps2.cc.

Referenced by keySymToPs2().

Bitfield<2> Ps2::middleButton

Definition at line 78 of file ps2.hh.

Bitfield<3> Ps2::one

Definition at line 79 of file ps2.hh.

Bitfield<1> Ps2::rightButton

Definition at line 77 of file ps2.hh.

const uint8_t Ps2::ShiftKey = 0x12

Definition at line 76 of file ps2.cc.

Referenced by keySymToPs2().

const uint32_t Ps2::UpperKeys = 0xff00

Definition at line 79 of file ps2.cc.

Referenced by keySymToPs2().

Bitfield<6> Ps2::xOverflow

Definition at line 82 of file ps2.hh.

Bitfield<4> Ps2::xSign

Definition at line 80 of file ps2.hh.

Bitfield<7> Ps2::yOverflow

Definition at line 83 of file ps2.hh.

Bitfield<5> Ps2::ySign

Definition at line 81 of file ps2.hh.


Generated on Fri Jun 9 2017 13:04:35 for gem5 by doxygen 1.8.6