
#pragma  once
#ifndef _HID_MAIN_H_
#define _HID_MAIN_H_

static uint8_t ui_hid_report[256];//UDI_HID_REPORT_OUT_SIZE
unsigned char * usb_rx_ptr;
unsigned char usb_last_rx_cmd;
static volatile bool main_b_generic_enable = false;
bool datos_listos;

/*! \brief Called by HID interface
 * Callback running when USB Host enable generic interface
 *
 * \retval true if generic startup is ok
 */
bool main_generic_enable(void);

/*! \brief Called by HID interface
 * Callback running when USB Host disable generic interface
 */
void main_generic_disable(void);

/*! \brief Called when a start of frame is received on USB line
 */
void main_sof_action(void);

/*! \brief Enters the application in low power mode
 * Callback called when USB host sets USB line in suspend state
 */
void main_suspend_action(void);

/*! \brief Called by UDD when the USB line exit of suspend state
 */
void main_resume_action(void);

/*! \brief Called by UDC when USB Host request to enable remote wakeup
 */
void main_remotewakeup_enable(void);

/*! \brief Called by UDC when USB Host request to disable remote wakeup
 */
void main_remotewakeup_disable(void);

/*! \brief Called by UDI HID generic when USB Host send a feature request
 */
void main_hid_set_feature(uint8_t* report);

void ui_process(uint16_t framenumber);

//! This function is called when a HID report is received
//!
void usb_data_received(uint8_t *report);



#endif // _MAIN_H_
