<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>MCUXpresso SDKのトピックHow does one receive LED states in USB keyboard</title>
    <link>https://community.nxp.com/t5/MCUXpresso-SDK/How-does-one-receive-LED-states-in-USB-keyboard/m-p/770191#M751</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using SDK 2 (2.3.0, specifically), and I've modded the composite keyboard and mouse example to create a PS/2-to-USB-adapter. Sending key events from the PS/2 keyboard via the MCU to the PC works great, but how does one go about receiving LED states sent from the operating system?&amp;nbsp; (I have written the code to set the LEDs on the PS/2 keyboard, I just need to figure out how to receive the LED states from the PC via the USB stack in the MCU).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I added some debug outputs to the USB_DeviceHidKeyboardCallback() function and noted that each time I press any of the keys which would normally toggle any of the LEDs, I get a kUSB_DeviceHidEventRequestReportBuffer event, so my guess it has something to do with that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reading the USB HID 1.11 reference I get a vague feeling that the composite example is missing something like an "out endpoint"? g_UsbDeviceHidKeyboardEndpoints only declares an USB_IN entry, and I was wondering if there needed to be an USB_OUT entry to receive codes? Then again, it looks like I'm getting a relevant event?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Help?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 18 Mar 2018 00:16:25 GMT</pubDate>
    <dc:creator>fsysjan</dc:creator>
    <dc:date>2018-03-18T00:16:25Z</dc:date>
    <item>
      <title>How does one receive LED states in USB keyboard</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/How-does-one-receive-LED-states-in-USB-keyboard/m-p/770191#M751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using SDK 2 (2.3.0, specifically), and I've modded the composite keyboard and mouse example to create a PS/2-to-USB-adapter. Sending key events from the PS/2 keyboard via the MCU to the PC works great, but how does one go about receiving LED states sent from the operating system?&amp;nbsp; (I have written the code to set the LEDs on the PS/2 keyboard, I just need to figure out how to receive the LED states from the PC via the USB stack in the MCU).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I added some debug outputs to the USB_DeviceHidKeyboardCallback() function and noted that each time I press any of the keys which would normally toggle any of the LEDs, I get a kUSB_DeviceHidEventRequestReportBuffer event, so my guess it has something to do with that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reading the USB HID 1.11 reference I get a vague feeling that the composite example is missing something like an "out endpoint"? g_UsbDeviceHidKeyboardEndpoints only declares an USB_IN entry, and I was wondering if there needed to be an USB_OUT entry to receive codes? Then again, it looks like I'm getting a relevant event?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Help?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Mar 2018 00:16:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/How-does-one-receive-LED-states-in-USB-keyboard/m-p/770191#M751</guid>
      <dc:creator>fsysjan</dc:creator>
      <dc:date>2018-03-18T00:16:25Z</dc:date>
    </item>
    <item>
      <title>Re: How does one receive LED states in USB keyboard</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/How-does-one-receive-LED-states-in-USB-keyboard/m-p/770192#M752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jan,&lt;/P&gt;&lt;P&gt;Yes, you have to add a "out endpoint". If you look at usb_device_descriptor.c, you will find keyboard interface only has a "in endpoint".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Mar 2018 05:41:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/How-does-one-receive-LED-states-in-USB-keyboard/m-p/770192#M752</guid>
      <dc:creator>jingpan</dc:creator>
      <dc:date>2018-03-22T05:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: How does one receive LED states in USB keyboard</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/How-does-one-receive-LED-states-in-USB-keyboard/m-p/770193#M753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What are the steps to accomplish that?&amp;nbsp; I tried to increase the USB_HID_KEYBOARD_ENDPOINT_COUNT, then added an USB_OUT entry to g_UsbDeviceHidKeyboardEndpoints (with its own address). When I ran that code I got a really odd behavior: When the device is plugged in Windows can not boot. If I plug it in after I boot then Windows can not shut down. And if it runs Windows Update it'll hang while trying to create a restore point and eventually bluescreens.&amp;nbsp; Clearly Windows is upset about the endpoint I created -- do I need to register it anywhere else?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm also curious about this post: &lt;A _jive_internal="true" class="link-titled" href="https://community.nxp.com/thread/359883?commentID=575322#comment" title="https://community.nxp.com/thread/359883?commentID=575322#comment-575322"&gt;https://community.nxp.com/thread/359883?commentID=575322#comment-575322&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As far as I have understood there's always an implicit control endpoint for both "in" and "out", and that post implies that for getting the LED status one doesn't need any additional endpoints?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Mar 2018 13:55:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/How-does-one-receive-LED-states-in-USB-keyboard/m-p/770193#M753</guid>
      <dc:creator>fsysjan</dc:creator>
      <dc:date>2018-03-22T13:55:12Z</dc:date>
    </item>
  </channel>
</rss>

