00001 00015 #include "config.h" 00016 00017 // PicPack includes 00018 #include "pic_usb.h" 00019 #include "pic_usb_buffer_mgt.h" 00020 #include "pic_serial.h" 00021 00022 // local includes 00023 #include "usb_hid_class.h" 00024 00025 // system includes 00026 #include "memory.h" 00027 00028 #define req_GET_REPORT 0x01 00029 #define req_GET_IDLE 0x02 00030 #define req_GET_PROTOCOL 0x03 00031 #define req_SET_REPORT 0x09 00032 #define req_SET_IDLE 0x0a 00033 #define req_SET_PROTOCOL 0x0b 00034 00035 00036 00037 void usb_handle_ctrl_read_class() { 00038 } 00039 00040 void usb_handle_ctrl_write_class(uns8 *data, uns16 count) { 00041 } 00042 00043 void usb_handle_class_request(setup_data_packet sdp) { 00044 serial_print_str("Class request: "); 00045 serial_print_int(sdp.bRequest); 00046 00047 switch(sdp.bRequest) { 00048 case req_GET_REPORT: 00049 break; 00050 case req_GET_IDLE: 00051 break; 00052 case req_GET_PROTOCOL: 00053 break; 00054 case req_SET_REPORT: 00055 break; 00056 case req_SET_IDLE: 00057 serial_print_str(" Set_idle "); 00058 // we don't support whatever they want 00059 usb_stall_ep0(); 00060 break; 00061 case req_SET_PROTOCOL: 00062 break; 00063 00064 } 00065 00066 } 00067