XenevaOS
Loading...
Searching...
No Matches
Macros | Functions | Variables
virtiotablet.c File Reference
#include <pcie.h>
#include <Hal/AA64/aa64lowlevel.h>
#include <Hal/AA64/gic.h>
#include <Fs/Dev/devinput.h>
#include <Drivers/virtio.h>
#include <Drivers/uart.h>
#include <Mm/pmmngr.h>
#include <aucon.h>
#include <Mm/vmmngr.h>
#include <Hal/AA64/sched.h>
Include dependency graph for virtiotablet.c:

Macros

#define MOUSE_LEFT_CLICK   0x01
 
#define MOUSE_RIGHT_CLICK   0x02
 
#define MOUSE_MIDDLE_CLICK   0x04
 
#define MOUSE_MOUSE_SCROLL_UP   0x10
 
#define MOUSE_MOUSE_SCROLL_DOWN   0x20
 

Functions

void AuVirtioTabletHandler (int spiNum)
 AuVirtioTabletHandler – interrupt handler for virtio tablet.
 
void AuVirtioTabletInitialize (uint64_t device)
 AuVirtioKbdInitialize – initialize the virtio keyboard.
 

Variables

struct VirtioQueueTabletQueue
 
uint16_t tabletIndex
 
int tabletQueueSz
 
int mouseX
 
int mouseY
 
int resX
 
int resY
 
int maxX
 
int maxY
 
int buttonLeft
 
int buttonMiddle
 
int buttonRight
 
int buttonScrollUp
 
int buttonScrollDown
 
struct VirtioInputEventTabletInput
 

Detailed Description

BSD 2-Clause License

Copyright (c) 2022-2025, Manas Kamal Choudhury All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Macro Definition Documentation

◆ MOUSE_LEFT_CLICK

#define MOUSE_LEFT_CLICK   0x01

◆ MOUSE_MIDDLE_CLICK

#define MOUSE_MIDDLE_CLICK   0x04

◆ MOUSE_MOUSE_SCROLL_DOWN

#define MOUSE_MOUSE_SCROLL_DOWN   0x20

◆ MOUSE_MOUSE_SCROLL_UP

#define MOUSE_MOUSE_SCROLL_UP   0x10

◆ MOUSE_RIGHT_CLICK

#define MOUSE_RIGHT_CLICK   0x02

Function Documentation

◆ AuVirtioTabletHandler()

void AuVirtioTabletHandler ( int  spiNum)

AuVirtioTabletHandler – interrupt handler for virtio tablet.

Parameters
spiNum– shared peripheral interrupt number passed by system

◆ AuVirtioTabletInitialize()

void AuVirtioTabletInitialize ( uint64_t  device)

AuVirtioKbdInitialize – initialize the virtio keyboard.

Variable Documentation

◆ buttonLeft

int buttonLeft

◆ buttonMiddle

int buttonMiddle

◆ buttonRight

int buttonRight

◆ buttonScrollDown

int buttonScrollDown

◆ buttonScrollUp

int buttonScrollUp

◆ maxX

int maxX

◆ maxY

int maxY

◆ mouseX

int mouseX

◆ mouseY

int mouseY

◆ resX

int resX

◆ resY

int resY

◆ tabletIndex

uint16_t tabletIndex

◆ TabletInput

struct VirtioInputEvent* TabletInput

◆ TabletQueue

struct VirtioQueue* TabletQueue

◆ tabletQueueSz

int tabletQueueSz