NOVA User-Level Environment  Version testbox/changed-memory-timing-317-g320d8b5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PS2Mouse Class Reference

A PS2 keyboard gets mouse packets the hostbus as input and outputs them on the ps2 bus. More...

Inheritance diagram for PS2Mouse:
StaticReceiver< PS2Mouse > Device

Public Member Functions

bool receive (MessageInput &msg)
bool receive (MessagePS2 &msg)
void set_defaults ()
 PS2Mouse (DBus< MessagePS2 > &bus_ps2, unsigned ps2port, unsigned hostmouse)
- Public Member Functions inherited from StaticReceiver< PS2Mouse >
 StaticReceiver ()
- Public Member Functions inherited from Device
void debug_dump ()
 Device (const char *debug_name)

Private Types

enum  {
  STATUS_RIGHT = 1 << 0, STATUS_MIDDLE = 1 << 1, STATUS_LEFT = 1 << 2, STATUS_SCALING = 1 << 4,
  STATUS_ENABLED = 1 << 5, STATUS_REMOTE = 1 << 6
}
enum  Params { PARAM_NONE, PARAM_ECHO, PARAM_SET_RESOLUTION, PARAM_SET_SAMPLERATE }

Private Member Functions

int scale_coord (bool report, int value)
unsigned gen_packet (bool report)
 Generate a packet and update the stored positions.
void set_packet (unsigned long long packet)
void update_packet ()

Private Attributes

DBus< MessagePS2 > & _bus_ps2
unsigned _ps2port
unsigned _hostmouse
unsigned long long _packet
unsigned char _status
unsigned char _resolution
unsigned char _samplerate
int _posx
int _posy
enum PS2Mouse::Params _param

Static Private Attributes

static unsigned const HOST_RESOLUTION_SHIFT = 2

Additional Inherited Members

- Static Public Member Functions inherited from StaticReceiver< PS2Mouse >
static bool receive_static (Device *o, M &msg)

Detailed Description

A PS2 keyboard gets mouse packets the hostbus as input and outputs them on the ps2 bus.

State: stable Features: mouse commands including poll mode, scaling, packet merging, resolution adaption Missing: different sample rate, packet resend, z-coordinate Documentation: PS2 hitrc, PS2 Mouse Interface, Trackpoint Engineering Specification 3E

Member Enumeration Documentation

anonymous enum
private
Enumerator:
STATUS_RIGHT 
STATUS_MIDDLE 
STATUS_LEFT 
STATUS_SCALING 
STATUS_ENABLED 
STATUS_REMOTE 
enum PS2Mouse::Params
private
Enumerator:
PARAM_NONE 
PARAM_ECHO 
PARAM_SET_RESOLUTION 
PARAM_SET_SAMPLERATE 

Constructor & Destructor Documentation

PS2Mouse::PS2Mouse ( DBus< MessagePS2 > &  bus_ps2,
unsigned  ps2port,
unsigned  hostmouse 
)
inline

Member Function Documentation

unsigned PS2Mouse::gen_packet ( bool  report)
inlineprivate

Generate a packet and update the stored positions.

bool PS2Mouse::receive ( MessageInput msg)
inline
bool PS2Mouse::receive ( MessagePS2 msg)
inline
int PS2Mouse::scale_coord ( bool  report,
int  value 
)
inlineprivate
void PS2Mouse::set_defaults ( )
inline
void PS2Mouse::set_packet ( unsigned long long  packet)
inlineprivate
void PS2Mouse::update_packet ( )
inlineprivate

Member Data Documentation

DBus<MessagePS2>& PS2Mouse::_bus_ps2
private
unsigned PS2Mouse::_hostmouse
private
unsigned long long PS2Mouse::_packet
private
enum PS2Mouse::Params PS2Mouse::_param
private
int PS2Mouse::_posx
private
int PS2Mouse::_posy
private
unsigned PS2Mouse::_ps2port
private
unsigned char PS2Mouse::_resolution
private
unsigned char PS2Mouse::_samplerate
private
unsigned char PS2Mouse::_status
private
unsigned const PS2Mouse::HOST_RESOLUTION_SHIFT = 2
staticprivate

The documentation for this class was generated from the following file: