#include "conf_usb.h"
#include "board.h"
#include "FreeRTOS.h"
#include "task.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 *pvParameters) |
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 |
|
static |
Display some animation on the LED according to the mouse status.
References LED_Display_Field(), LED_HOST_MOUSE_B0, LED_HOST_MOUSE_B1, LED_HOST_MOUSE_B2, LED_HOST_MOUSE_B3, LED_Toggle(), mouse_b0, mouse_b1, mouse_b2, new_x, and new_y.
Referenced by host_mouse_hid_task().
void host_mouse_hid_task | ( | void * | pvParameters | ) |
This function manages the host mouse HID task.
References configTSK_USB_HHID_MOUSE_PERIOD, disp_ascii_mouse(), disp_led_mouse(), Get_class, Get_ep_pipe, Get_nb_supported_interface, Get_protocol, HID_CLASS, HID_IDLE_DURATION_INDEFINITE, HID_REPORT_DESCRIPTOR, HID_REPORT_ID_ALL, Host_ack_in_received, Host_ack_nak_received, Host_enable_continuous_in_mode, Host_free_in, host_hid_get_report(), host_hid_set_idle(), host_read_p_rxpacket(), Host_reset_pipe_fifo_access, Host_unfreeze_pipe, Is_host_in_received, Is_host_mouse_hid_configured, Is_host_nak_received, Is_host_ready, Is_host_stall, LED_HOST_MOUSE_B0, LED_HOST_MOUSE_B1, LED_HOST_MOUSE_B2, LED_HOST_MOUSE_B3, LED_Off(), mouse_b0, mouse_b1, mouse_b2, mouse_hid_connected, mouse_hid_new_device_connected, MOUSE_PROTOCOL, mouse_x, MOUSE_X_MAX, MOUSE_X_MIN, mouse_y, MOUSE_Y_MAX, MOUSE_Y_MIN, new_x, new_y, pipe_mouse_in, usb_report, vTaskDelayUntil(), and xTaskGetTickCount().
Referenced by host_mouse_hid_task_init(), and main().
void host_mouse_hid_task_init | ( | void | ) |
This function initializes the host mouse HID task.
References configTSK_USB_HHID_MOUSE_NAME, configTSK_USB_HHID_MOUSE_PRIORITY, configTSK_USB_HHID_MOUSE_STACK_SIZE, host_mouse_hid_task(), mouse_hid_connected, mouse_hid_new_device_connected, sof_cnt, and xTaskCreate.
Referenced by main().
bool mouse_b0 |
Referenced by disp_ascii_mouse(), disp_led_mouse(), and host_mouse_hid_task().
bool mouse_b1 |
Referenced by disp_ascii_mouse(), disp_led_mouse(), and host_mouse_hid_task().
bool mouse_b2 |
Referenced by disp_ascii_mouse(), disp_led_mouse(), and host_mouse_hid_task().
int8_t mouse_x |
Referenced by disp_ascii_mouse(), and host_mouse_hid_task().
int8_t mouse_y |
Referenced by disp_ascii_mouse(), and host_mouse_hid_task().
int8_t new_x |
Referenced by disp_led_mouse(), and host_mouse_hid_task().
int8_t new_y |
Referenced by disp_led_mouse(), and host_mouse_hid_task().
uint8_t pipe_mouse_in |
Referenced by host_mouse_hid_task().
|
static |
Referenced by host_mouse_hid_task_init(), and host_sof_action().
volatile int8_t usb_report[4] |
Referenced by host_mouse_hid_task().