ミニミニキーボードの作成
スイッチを押すとエンターキーをPCに送るミニミニキーボードを作成しました。
C:\Microchip Solutions v2012-08-22\USB\Device - HID - Keyboard\Keyboard.c の中身をこんな風に変更
void Keyboard(void) { static unsigned char key = 40; //Enter //Check if the IN endpoint is not busy, and if it isn't check if we want to send //keystroke data to the host. if(!HIDTxHandleBusy(lastINTransmission)) { if(Switch3IsPressed()) { //Load the HID buffer hid_report_in[0] = 0; hid_report_in[1] = 0; hid_report_in[2] = 40; //Enter hid_report_in[3] = 0; hid_report_in[4] = 0; hid_report_in[5] = 0; hid_report_in[6] = 0; hid_report_in[7] = 0; //Send the 8 byte packet over USB to the host. lastINTransmission = HIDTxPacket(HID_EP, (BYTE*)hid_report_in, 0x08);