Microchip® Advanced Software Framework

host_mouse_hid_task.c File Reference
#include "conf_usb.h"
#include "board.h"
#include "usb_drv.h"
#include "usb_host_enum.h"
#include "usb_host_task.h"
#include "host_hid.h"
#include "host_mouse_hid_task.h"
#include <stdio.h>

Macros

#define MOUSE_X_MAX   80
 
#define MOUSE_X_MIN   0
 
#define MOUSE_Y_MAX   18
 
#define MOUSE_Y_MIN   0
 

Functions

static void disp_ascii_mouse (void)
 Display the mouse pointer on a terminal. More...
 
static void disp_led_mouse (void)
 Display some animation on the LED according to the mouse status. More...
 
void host_mouse_hid_task (void)
 This function manages the host mouse HID task. More...
 
void host_mouse_hid_task_init (void)
 This function initializes the host mouse HID task. More...
 
void host_sof_action (void)
 host_sof_action More...
 

Variables

bool mouse_b0
 
bool mouse_b1
 
bool mouse_b2
 
volatile bool mouse_hid_connected
 
volatile bool mouse_hid_new_device_connected
 
int8_t mouse_x
 
int8_t mouse_y
 
int8_t new_x
 
int8_t new_y
 
uint8_t pipe_mouse_in
 
static uint16_t sof_cnt
 
volatile int8_t usb_report [4]
 

#define MOUSE_X_MAX   80

Referenced by host_mouse_hid_task().

#define MOUSE_X_MIN   0

Referenced by host_mouse_hid_task().

#define MOUSE_Y_MAX   18

Referenced by host_mouse_hid_task().

#define MOUSE_Y_MIN   0

Referenced by host_mouse_hid_task().

static void disp_ascii_mouse ( void  )
static

Display the mouse pointer on a terminal.

This function displays a mouse cursor through the USART port.

References mouse_b0, mouse_b1, mouse_b2, mouse_x, and mouse_y.

Referenced by host_mouse_hid_task().

static void disp_led_mouse ( void  )
static

Display some animation on the LED according to the mouse status.

References LED_HOST_MOUSE_B0, LED_HOST_MOUSE_B1, LED_HOST_MOUSE_B2, LED_HOST_MOUSE_B3, mouse_b0, mouse_b1, mouse_b2, new_x, and new_y.

Referenced by host_mouse_hid_task().

void host_mouse_hid_task_init ( void  )

int8_t mouse_x
int8_t mouse_y
int8_t new_y
uint8_t pipe_mouse_in

Referenced by host_mouse_hid_task().

uint16_t sof_cnt
static
volatile int8_t usb_report[4]

Referenced by host_mouse_hid_task().