struct v3_keyboard_event {
+ // A keyboard event is a PS/2 scancode and status reg
unsigned char status;
unsigned char scan_code;
};
struct v3_mouse_event {
- unsigned char data[3];
+ // A mouse event is a PS/2 mouse packet
+ unsigned char sx; // sign bit for deltax
+ unsigned char dx; // deltax
+ unsigned char sy; // sign bit for deltay
+ unsigned char dy; // deltay
+ unsigned char buttons; // button state
};
struct v3_timer_event {
unsigned int cmd;
};
-struct v3_packet_event {
- unsigned char * pkt;
- unsigned int size;
+
+struct v3_debug_event {
+ unsigned int core_id;
+ unsigned int cmd;
+
};
#ifdef __V3VEE__
HOST_MOUSE_EVT,
HOST_TIMER_EVT,
HOST_CONSOLE_EVT,
- HOST_SERIAL_EVT,
- HOST_PACKET_EVT} v3_host_evt_type_t;
+ HOST_SERIAL_EVT,
+ HOST_DEBUG_EVT} v3_host_evt_type_t;
union v3_host_event_handler {
int (*timer_handler)(struct v3_vm_info * vm, struct v3_timer_event * evt, void * priv_data);
int (*serial_handler)(struct v3_vm_info * vm, struct v3_serial_event * evt, void * priv_data);
int (*console_handler)(struct v3_vm_info * vm, struct v3_console_event * evt, void * priv_data);
- int (*packet_handler)(struct v3_vm_info * vm, struct v3_packet_event * evt, void * priv_data);
+ int (*debug_handler)(struct v3_vm_info * vm, struct v3_debug_event * evt, void * priv_data);
};
struct list_head timer_events;
struct list_head serial_events;
struct list_head console_events;
- struct list_head packet_events;
+ struct list_head debug_events;
};
int v3_deliver_timer_event(struct v3_vm_info * vm, struct v3_timer_event * evt);
int v3_deliver_serial_event(struct v3_vm_info * vm, struct v3_serial_event * evt);
int v3_deliver_console_event(struct v3_vm_info * vm, struct v3_console_event * evt);
-int v3_deliver_packet_event(struct v3_vm_info * vm, struct v3_packet_event * evt);
+int v3_deliver_debug_event(struct v3_vm_info * vm, struct v3_debug_event * evt);
#endif