#include "conf_usb.h"
Functions | |
void | device_generic_hid_task (void) |
Entry point of the HID generic communication task This function manages IN/OUT report management. More... | |
void | device_generic_hid_task_init (void) |
This function initializes the hardware/software resources required for device generic HID task. More... | |
void | fill_tx_buffer (void) |
Send data report to USB HID Host. More... | |
void | hid_check_vbus (void) |
check if USB VBUS active. More... | |
void | usb_sof_action (void) |
usb_sof_action More... | |
void device_generic_hid_task | ( | void | ) |
Entry point of the HID generic communication task This function manages IN/OUT report management.
References fill_tx_buffer(), hid_check_vbus(), hid_report_in(), hid_report_out(), and Is_device_enumerated.
Referenced by main().
void device_generic_hid_task_init | ( | void | ) |
This function initializes the hardware/software resources required for device generic HID task.
References ack_message, pdca_channel_options_t::addr, AVR32_PDCA_PID_USART_TX, Disable_global_interrupt, Enable_global_interrupt, fifo_init(), fifo_rx, gpio_set_gpio_pin(), int_handler_usart(), INTC_register_interrupt(), Is_usb_device, hid_frames::packetCount, hid_frames::packetNumber, hid_frames::payload, PAYLOAD_SIZE, PDCA_CHANNEL_USART, pdca_init_channel(), PDCA_TRANSFER_SIZE_BYTE, PROTOCOL_ID, hid_frames::protocol_id, RX_LED, serial_tx_frame, sof_cnt, hid_frames::spare_byte1, hid_frames::spare_byte2, TX_LED, USART_IRQ, USART_RX_BUFFER, and Usb_enable_sof_interrupt.
Referenced by main().
void fill_tx_buffer | ( | void | ) |
Send data report to USB HID Host.
References fifo_get_used_size(), FIFO_OK, fifo_pull_uint8(), gpio_clr_gpio_pin(), recieved_data, RX_LED, send_message(), serial_rx_frame, TX_LED, write_hid_message, and write_hid_message_index.
Referenced by device_generic_hid_task().
void hid_check_vbus | ( | void | ) |
check if USB VBUS active.
If VBUS is not active, put the device in Stop mode until VBUS become active
References cpu_delay_ms(), FOSC0, gpio_clr_gpio_pin(), gpio_enable_pin_pull_up(), gpio_set_gpio_pin(), gpio_tgl_gpio_pin(), init_rs232(), Is_usb_vbus_low, pcl_freq_param, RX_LED, SLEEP, TX_LED, USART, USART_BAUDRATE, and USART_RX_PIN.
Referenced by device_generic_hid_task().