{"id":21018,"date":"2019-08-30T09:24:58","date_gmt":"2019-08-30T09:24:58","guid":{"rendered":"https:\/\/www.dmcinfo.com\/blog\/21018\/trying-out-arm-mbed-oss-new-support-for-usb-device-with-some-retro-hardware\/"},"modified":"2026-02-05T11:02:02","modified_gmt":"2026-02-05T16:02:02","slug":"trying-out-arm-mbed-oss-new-support-for-usb-device-with-some-retro-hardware","status":"publish","type":"post","link":"https:\/\/www.dmcinfo.com\/blog\/21018\/trying-out-arm-mbed-oss-new-support-for-usb-device-with-some-retro-hardware\/","title":{"rendered":"Trying Out ARM Mbed OS\u2019s New Support for USB Device with Some Retro Hardware"},"content":{"rendered":"\n<p>Many products feature USB to facilitate communication between various devices, to transfer files easily, support hardware peripherals or add other features. While working on embedded systems, we have developed a variety of devices that utilize USB in these ways.<\/p>\n\n\n\n<p>The ease of implementation of USB largely depends on the hardware and software infrastructure that the microcontroller manufacturer provides. As of release 5.12.0, ARM Mbed OS began supporting USB device for several targets. This provides a nice layer of abstraction between the various manufacturers\u2019 USB implementations and the USB class code. There are a variety of USB classes that are supported by default: USB MSD, USB HID, and USB Audio.<\/p>\n\n\n\n<p>In this blog, I\u2019m going to try out this new USB device support and create a USB Mouse out of an old joystick.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-setting-up-the-project\">Setting up the Project<\/h2>\n\n\n\n<p>I want to test out the USB HID class which will allow the device to interface with the PC as a USB mouse. I am going to start by creating a <strong>basic ARM Mbed OS<\/strong> project. If you have never done that before, take a look at <a href=\"\/latest-thinking\/blog\/id\/9536\/nucleo-uart-tutorial-mbed-style\">this guide.<\/a><\/p>\n\n\n\n<p>For this project, I am using a <strong>NUCLEO_F429ZI<\/strong> development board which is one of the supported targets for using mbed\u2019s USB device. I set the target in my project by using the command <strong>\u201cmbed target NUCLEO_F429ZI\u201d.<\/strong> Make sure that your compiler is also set correctly according to the compiler that you have installed.<\/p>\n\n\n\n<p>For the test, I am going to copy-and-paste the example main from the file mbed\/usb\/device\/USBHID\/USBMouse.h.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e\"><span style=\"background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e\">C++<\/span><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>#include \"mbed.h\"\n#include \"USBMouse.h\" \n\nUSBMouse mouse;\n\nint main(void)\n{\n  while (1)\n  {\n      mouse.move(20, 0);\n      wait(0.5);\n  }\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #C586C0\">#include<\/span><span style=\"color: #569CD6\"> <\/span><span style=\"color: #CE9178\">&quot;mbed.h&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #C586C0\">#include<\/span><span style=\"color: #569CD6\"> <\/span><span style=\"color: #CE9178\">&quot;USBMouse.h&quot;<\/span><span style=\"color: #569CD6\"> <\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">USBMouse mouse;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #569CD6\">int<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #DCDCAA\">main<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #569CD6\">void<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #C586C0\">while<\/span><span style=\"color: #D4D4D4\"> (<\/span><span style=\"color: #B5CEA8\">1<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">  {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">      <\/span><span style=\"color: #9CDCFE\">mouse<\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #DCDCAA\">move<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #B5CEA8\">20<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">      <\/span><span style=\"color: #DCDCAA\">wait<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #B5CEA8\">0.5<\/span><span style=\"color: #D4D4D4\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">  }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Try and compile the project by running<strong> \u201cmbed compile.\u201d<\/strong> If you successfully build this project, then you are ready for the next steps. If not, make sure the target you are using is supported by ARM Mbed OS\u2019s new USB device.<\/p>\n\n\n\n<p>Note, not all of the targets with hardware USB support Mbed\u2019s USB device abstraction! Also, make sure you have the latest version of ARM Mbed OS in your project.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-running-a-quick-test\">Running a Quick Test<\/h2>\n\n\n\n<p>Load the compiled program onto your target development kit. I am using a NUCLEO which has a STLINK on-board, so the development kit shows up as a drive when I plug it in. Just drag-and-drop the compiled<strong> \u201c_your_project_name_.bin\u201d<\/strong> onto the drive to program.<\/p>\n\n\n\n<p>To test the USB HID device, plug in the User USB port to the PC in addition to the debugging port which is needed for power. On your PC, you should see that a new USB device is detected. Once setup, your PC\u2019s cursor should slowly move across your screen in 0.5-second steps.<\/p>\n\n\n\n<p>We are now ready to bring in the retro hardware to complete our USB device!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-adding-some-more-hardware\">Adding Some More Hardware<\/h2>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/05\/27161544\/mbed-apple-joystick.jpg\" alt=\"apple joystick\"\/><\/figure>\n\n\n\n<p>I have an old Apple Joystick IIe that I want&nbsp;to use&nbsp;as a USB joystick; so I need a custom USB adapter. The joystick electronics are very simple. There are two pushbuttons with pull-down resistors and two variable resistors, one for each axis, with one side tied to V+.<\/p>\n\n\n\n<p>To interface to the joystick, I connect 3.3 V on the NUCLEO to the V+, connect the GND on the NUCLEO to the joystick ground, connect the push-button outputs to digital inputs on the NUCLEO, and connect each axis output to a NUCLEO analog input with a 100 K ohm resistor to ground.<\/p>\n\n\n\n<p>I pulled all of this together quickly with a small prototyping board. The connector itself is just half of an RS232 serial cable.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/05\/27161544\/mbed-microcontroller.jpg\" alt=\"microcontroler for joystick\"\/><\/figure>\n\n\n\n<p>Now, with a bit of firmware, we can get this retro joystick to operate with any modern OS.<\/p>\n\n\n\n<p>The code below is what I quickly put together to read the analog inputs of the joystick, read the button presses, and send corresponding USB Mouse events. When using one of the various supported USB device classes, Mbed can substantially decrease the required development time.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e\"><span style=\"background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e\">C++<\/span><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>#include \"mbed.h\"\n#include \"USBMouse.h\"\n\nUSBMouse mouse;\n\nAnalogIn ainx(A0);\nAnalogIn ainy(A1);\n\nDigitalIn right_button(D6);\nDigitalIn left_button(D7);\n\nint main()\n{\n\tfloat x = 0;\n\tfloat y = 0;\n\n\tbool prev_right_button = true;\n\tbool prev_left_button = true;\n\t\n\tconst float mid_x = ainx.read() * 100.0;\n\tconst float mid_y = ainy.read() * 100.0;\n\t\n\twhile (1)\n\t{\n\t\t\/\/ Update the X, Y position\n\t\ty = ainy.read() * 100.0;\n\t\tx = ainx.read() * 100.0;\n\n\t\tfloat x_move = x - mid_x;\n\t\tfloat y_move = y - mid_y;\n\n\t\tif (x_move &lt; 0)\n\t\t\tx_move = 2 * x_move;\n\t\tif (y_move &lt; 0)\n\t\t\ty_move = 2 * y_move;\n\n\t\tif ((abs(x_move) > 4.0) || (abs(y_move) > 4.0))\n\t\t{\n\t\t\tmouse.move(-1 * x_move, -1 * y_move);\n\t\t}\n\n\t\t\/\/ Update the button presses\n\t\tbool current_right_button = right_button;\n\t\tbool current_left_button = left_button;\n\n\t\tif (prev_right_button != current_right_button)\n\t\t{\n\t\t\tif (current_right_button)\n\t\t\t{\n\t\t\t\tmouse.press(MOUSE_RIGHT);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmouse.release(MOUSE_RIGHT);\n\t\t\t}\n\t\t\tprev_right_button = current_right_button;\n\t\t}\n\n\t\tif (prev_left_button != current_left_button)\n\t\t{\n\t\t\tif (current_left_button)\n\t\t\t{\n\t\t\t\tmouse.press(MOUSE_LEFT);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmouse.release(MOUSE_LEFT);\n\t\t\t}\n\t\t\tprev_left_button = current_left_button;\n\t\t}\n\n\t\twait_ms(10);\n\t}\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #C586C0\">#include<\/span><span style=\"color: #569CD6\"> <\/span><span style=\"color: #CE9178\">&quot;mbed.h&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #C586C0\">#include<\/span><span style=\"color: #569CD6\"> <\/span><span style=\"color: #CE9178\">&quot;USBMouse.h&quot;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">USBMouse mouse;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #4EC9B0\">AnalogIn<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #DCDCAA\">ainx<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #4EC9B0\">A0<\/span><span style=\"color: #D4D4D4\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #4EC9B0\">AnalogIn<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #DCDCAA\">ainy<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #4EC9B0\">A1<\/span><span style=\"color: #D4D4D4\">);<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #4EC9B0\">DigitalIn<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #DCDCAA\">right_button<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #4EC9B0\">D6<\/span><span style=\"color: #D4D4D4\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #4EC9B0\">DigitalIn<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #DCDCAA\">left_button<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #4EC9B0\">D7<\/span><span style=\"color: #D4D4D4\">);<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #569CD6\">int<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #DCDCAA\">main<\/span><span style=\"color: #D4D4D4\">()<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t<\/span><span style=\"color: #569CD6\">float<\/span><span style=\"color: #D4D4D4\"> x = <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t<\/span><span style=\"color: #569CD6\">float<\/span><span style=\"color: #D4D4D4\"> y = <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t<\/span><span style=\"color: #569CD6\">bool<\/span><span style=\"color: #D4D4D4\"> prev_right_button = <\/span><span style=\"color: #569CD6\">true<\/span><span style=\"color: #D4D4D4\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t<\/span><span style=\"color: #569CD6\">bool<\/span><span style=\"color: #D4D4D4\"> prev_left_button = <\/span><span style=\"color: #569CD6\">true<\/span><span style=\"color: #D4D4D4\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t<\/span><span style=\"color: #569CD6\">const<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">float<\/span><span style=\"color: #D4D4D4\"> mid_x = <\/span><span style=\"color: #9CDCFE\">ainx<\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #DCDCAA\">read<\/span><span style=\"color: #D4D4D4\">() * <\/span><span style=\"color: #B5CEA8\">100.0<\/span><span style=\"color: #D4D4D4\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t<\/span><span style=\"color: #569CD6\">const<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">float<\/span><span style=\"color: #D4D4D4\"> mid_y = <\/span><span style=\"color: #9CDCFE\">ainy<\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #DCDCAA\">read<\/span><span style=\"color: #D4D4D4\">() * <\/span><span style=\"color: #B5CEA8\">100.0<\/span><span style=\"color: #D4D4D4\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t<\/span><span style=\"color: #C586C0\">while<\/span><span style=\"color: #D4D4D4\"> (<\/span><span style=\"color: #B5CEA8\">1<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6A9955\">\t\t\/\/ Update the X, Y position<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t\ty = <\/span><span style=\"color: #9CDCFE\">ainy<\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #DCDCAA\">read<\/span><span style=\"color: #D4D4D4\">() * <\/span><span style=\"color: #B5CEA8\">100.0<\/span><span style=\"color: #D4D4D4\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t\tx = <\/span><span style=\"color: #9CDCFE\">ainx<\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #DCDCAA\">read<\/span><span style=\"color: #D4D4D4\">() * <\/span><span style=\"color: #B5CEA8\">100.0<\/span><span style=\"color: #D4D4D4\">;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t\t<\/span><span style=\"color: #569CD6\">float<\/span><span style=\"color: #D4D4D4\"> x_move = x - mid_x;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t\t<\/span><span style=\"color: #569CD6\">float<\/span><span style=\"color: #D4D4D4\"> y_move = y - mid_y;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t\t<\/span><span style=\"color: #C586C0\">if<\/span><span style=\"color: #D4D4D4\"> (x_move &lt; <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t\t\tx_move = <\/span><span style=\"color: #B5CEA8\">2<\/span><span style=\"color: #D4D4D4\"> * x_move;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t\t<\/span><span style=\"color: #C586C0\">if<\/span><span style=\"color: #D4D4D4\"> (y_move &lt; <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t\t\ty_move = <\/span><span style=\"color: #B5CEA8\">2<\/span><span style=\"color: #D4D4D4\"> * y_move;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t\t<\/span><span style=\"color: #C586C0\">if<\/span><span style=\"color: #D4D4D4\"> ((<\/span><span style=\"color: #DCDCAA\">abs<\/span><span style=\"color: #D4D4D4\">(x_move) &gt; <\/span><span style=\"color: #B5CEA8\">4.0<\/span><span style=\"color: #D4D4D4\">) || (<\/span><span style=\"color: #DCDCAA\">abs<\/span><span style=\"color: #D4D4D4\">(y_move) &gt; <\/span><span style=\"color: #B5CEA8\">4.0<\/span><span style=\"color: #D4D4D4\">))<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t\t{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t\t\t<\/span><span style=\"color: #9CDCFE\">mouse<\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #DCDCAA\">move<\/span><span style=\"color: #D4D4D4\">(-<\/span><span style=\"color: #B5CEA8\">1<\/span><span style=\"color: #D4D4D4\"> * x_move, -<\/span><span style=\"color: #B5CEA8\">1<\/span><span style=\"color: #D4D4D4\"> * y_move);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t\t}<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #6A9955\">\t\t\/\/ Update the button presses<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t\t<\/span><span style=\"color: #569CD6\">bool<\/span><span style=\"color: #D4D4D4\"> current_right_button = right_button;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t\t<\/span><span style=\"color: #569CD6\">bool<\/span><span style=\"color: #D4D4D4\"> current_left_button = left_button;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t\t<\/span><span style=\"color: #C586C0\">if<\/span><span style=\"color: #D4D4D4\"> (prev_right_button != current_right_button)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t\t{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t\t\t<\/span><span style=\"color: #C586C0\">if<\/span><span style=\"color: #D4D4D4\"> (current_right_button)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t\t\t{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t\t\t\t<\/span><span style=\"color: #9CDCFE\">mouse<\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #DCDCAA\">press<\/span><span style=\"color: #D4D4D4\">(MOUSE_RIGHT);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t\t\t}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t\t\t<\/span><span style=\"color: #C586C0\">else<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t\t\t{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t\t\t\t<\/span><span style=\"color: #9CDCFE\">mouse<\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #DCDCAA\">release<\/span><span style=\"color: #D4D4D4\">(MOUSE_RIGHT);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t\t\t}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t\t\tprev_right_button = current_right_button;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t\t}<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t\t<\/span><span style=\"color: #C586C0\">if<\/span><span style=\"color: #D4D4D4\"> (prev_left_button != current_left_button)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t\t{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t\t\t<\/span><span style=\"color: #C586C0\">if<\/span><span style=\"color: #D4D4D4\"> (current_left_button)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t\t\t{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t\t\t\t<\/span><span style=\"color: #9CDCFE\">mouse<\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #DCDCAA\">press<\/span><span style=\"color: #D4D4D4\">(MOUSE_LEFT);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t\t\t}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t\t\t<\/span><span style=\"color: #C586C0\">else<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t\t\t{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t\t\t\t<\/span><span style=\"color: #9CDCFE\">mouse<\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #DCDCAA\">release<\/span><span style=\"color: #D4D4D4\">(MOUSE_LEFT);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t\t\t}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t\t\tprev_left_button = current_left_button;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t\t}<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t\t<\/span><span style=\"color: #DCDCAA\">wait_ms<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #B5CEA8\">10<\/span><span style=\"color: #D4D4D4\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\t}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-testing-it-out\">Testing it Out<\/h2>\n\n\n\n<p>Plug it into the PC and try out this retro joystick working with a modern machine!<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/05\/27161543\/mbed-joystick-and-controller.jpg\" alt=\"joystick and controller\"\/><\/figure>\n\n\n\n<p>This is a great way to get a simple USB device going, but often a product will require more customization or non-supported USB class. If this is the case for you, <a href=\"\/contact\">come talk<\/a> to our <a href=\"\/services\/embedded-development-and-embedded-programming\">embedded development and programming group<\/a> to see what solution makes sense for you!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Many products feature USB to facilitate communication between various devices, to transfer files easily, support hardware peripherals or add other features. While working on embedded systems, we have developed a variety of devices that utilize USB in these ways. The ease of implementation of USB largely depends on the hardware and software infrastructure that the [&hellip;]<\/p>\n","protected":false},"author":322,"featured_media":21019,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[896,754],"tags":[923,1112],"class_list":["post-21018","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-circuit-design","category-embedded-development-programming","tag-how-to","tag-microcontroller-programming"],"yoast_head":"<title>Trying Out ARM Mbed OS\u2019s New Support for USB Device with Some Retro Hardware | DMC, Inc.<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dmcinfo.com\/blog\/21018\/trying-out-arm-mbed-oss-new-support-for-usb-device-with-some-retro-hardware\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Trying Out ARM Mbed OS\u2019s New Support for USB Device with Some Retro Hardware\" \/>\n<meta property=\"og:description\" content=\"Many products feature USB to facilitate communication between various devices, to transfer files easily, support hardware peripherals or add other features. While working on embedded systems, we have developed a variety of devices that utilize USB in these ways. The ease of implementation of USB largely depends on the hardware and software infrastructure that the [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dmcinfo.com\/blog\/21018\/trying-out-arm-mbed-oss-new-support-for-usb-device-with-some-retro-hardware\/\" \/>\n<meta property=\"og:site_name\" content=\"DMC, Inc.\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/pages\/DMC-Inc\/107982009242929\" \/>\n<meta property=\"article:published_time\" content=\"2019-08-30T09:24:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-02-05T16:02:02+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/05\/27161542\/joystick-banner.png\" \/>\n\t<meta property=\"og:image:width\" content=\"925\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"DMC\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DMC\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dmcinfo.com\/blog\/21018\/trying-out-arm-mbed-oss-new-support-for-usb-device-with-some-retro-hardware\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dmcinfo.com\/blog\/21018\/trying-out-arm-mbed-oss-new-support-for-usb-device-with-some-retro-hardware\/\"},\"author\":{\"name\":\"DMC\",\"@id\":\"https:\/\/www.dmcinfo.com\/#\/schema\/person\/eab178041edfa6657dc10afa8e001e13\"},\"headline\":\"Trying Out ARM Mbed OS\u2019s New Support for USB Device with Some Retro Hardware\",\"datePublished\":\"2019-08-30T09:24:58+00:00\",\"dateModified\":\"2026-02-05T16:02:02+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dmcinfo.com\/blog\/21018\/trying-out-arm-mbed-oss-new-support-for-usb-device-with-some-retro-hardware\/\"},\"wordCount\":731,\"publisher\":{\"@id\":\"https:\/\/www.dmcinfo.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.dmcinfo.com\/blog\/21018\/trying-out-arm-mbed-oss-new-support-for-usb-device-with-some-retro-hardware\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/05\/27161542\/joystick-banner.png\",\"keywords\":[\"How To\",\"Microcontroller Programming\"],\"articleSection\":[\"Circuit Design\",\"Embedded Development &amp; Programming\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dmcinfo.com\/blog\/21018\/trying-out-arm-mbed-oss-new-support-for-usb-device-with-some-retro-hardware\/\",\"url\":\"https:\/\/www.dmcinfo.com\/blog\/21018\/trying-out-arm-mbed-oss-new-support-for-usb-device-with-some-retro-hardware\/\",\"name\":\"Trying Out ARM Mbed OS\u2019s New Support for USB Device with Some Retro Hardware | DMC, Inc.\",\"isPartOf\":{\"@id\":\"https:\/\/www.dmcinfo.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.dmcinfo.com\/blog\/21018\/trying-out-arm-mbed-oss-new-support-for-usb-device-with-some-retro-hardware\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.dmcinfo.com\/blog\/21018\/trying-out-arm-mbed-oss-new-support-for-usb-device-with-some-retro-hardware\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/05\/27161542\/joystick-banner.png\",\"datePublished\":\"2019-08-30T09:24:58+00:00\",\"dateModified\":\"2026-02-05T16:02:02+00:00\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dmcinfo.com\/blog\/21018\/trying-out-arm-mbed-oss-new-support-for-usb-device-with-some-retro-hardware\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.dmcinfo.com\/blog\/21018\/trying-out-arm-mbed-oss-new-support-for-usb-device-with-some-retro-hardware\/#primaryimage\",\"url\":\"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/05\/27161542\/joystick-banner.png\",\"contentUrl\":\"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/05\/27161542\/joystick-banner.png\",\"width\":925,\"height\":400,\"caption\":\"joystick-banner\"},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dmcinfo.com\/#website\",\"url\":\"https:\/\/www.dmcinfo.com\/\",\"name\":\"DMC, Inc.\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.dmcinfo.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dmcinfo.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.dmcinfo.com\/#organization\",\"name\":\"DMC, Inc.\",\"url\":\"https:\/\/www.dmcinfo.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.dmcinfo.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/05\/27171146\/dmc-logo-1.png\",\"contentUrl\":\"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/05\/27171146\/dmc-logo-1.png\",\"width\":418,\"height\":167,\"caption\":\"DMC, Inc.\"},\"image\":{\"@id\":\"https:\/\/www.dmcinfo.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/pages\/DMC-Inc\/107982009242929\",\"https:\/\/www.instagram.com\/dmcengineering\",\"https:\/\/www.youtube.com\/DMCEngineering\",\"https:\/\/www.linkedin.com\/company\/dmc-engineering\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dmcinfo.com\/#\/schema\/person\/eab178041edfa6657dc10afa8e001e13\",\"name\":\"DMC\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.dmcinfo.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/06\/27185251\/dmc-avatar.png\",\"contentUrl\":\"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/06\/27185251\/dmc-avatar.png\",\"caption\":\"DMC\"},\"url\":\"https:\/\/www.dmcinfo.com\/blog\/author\/dmc\/\"}]}<\/script>","yoast_head_json":{"title":"Trying Out ARM Mbed OS\u2019s New Support for USB Device with Some Retro Hardware | DMC, Inc.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dmcinfo.com\/blog\/21018\/trying-out-arm-mbed-oss-new-support-for-usb-device-with-some-retro-hardware\/","og_locale":"en_US","og_type":"article","og_title":"Trying Out ARM Mbed OS\u2019s New Support for USB Device with Some Retro Hardware","og_description":"Many products feature USB to facilitate communication between various devices, to transfer files easily, support hardware peripherals or add other features. While working on embedded systems, we have developed a variety of devices that utilize USB in these ways. The ease of implementation of USB largely depends on the hardware and software infrastructure that the [&hellip;]","og_url":"https:\/\/www.dmcinfo.com\/blog\/21018\/trying-out-arm-mbed-oss-new-support-for-usb-device-with-some-retro-hardware\/","og_site_name":"DMC, Inc.","article_publisher":"https:\/\/www.facebook.com\/pages\/DMC-Inc\/107982009242929","article_published_time":"2019-08-30T09:24:58+00:00","article_modified_time":"2026-02-05T16:02:02+00:00","og_image":[{"width":925,"height":400,"url":"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/05\/27161542\/joystick-banner.png","type":"image\/png"}],"author":"DMC","twitter_card":"summary_large_image","twitter_misc":{"Written by":"DMC","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dmcinfo.com\/blog\/21018\/trying-out-arm-mbed-oss-new-support-for-usb-device-with-some-retro-hardware\/#article","isPartOf":{"@id":"https:\/\/www.dmcinfo.com\/blog\/21018\/trying-out-arm-mbed-oss-new-support-for-usb-device-with-some-retro-hardware\/"},"author":{"name":"DMC","@id":"https:\/\/www.dmcinfo.com\/#\/schema\/person\/eab178041edfa6657dc10afa8e001e13"},"headline":"Trying Out ARM Mbed OS\u2019s New Support for USB Device with Some Retro Hardware","datePublished":"2019-08-30T09:24:58+00:00","dateModified":"2026-02-05T16:02:02+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dmcinfo.com\/blog\/21018\/trying-out-arm-mbed-oss-new-support-for-usb-device-with-some-retro-hardware\/"},"wordCount":731,"publisher":{"@id":"https:\/\/www.dmcinfo.com\/#organization"},"image":{"@id":"https:\/\/www.dmcinfo.com\/blog\/21018\/trying-out-arm-mbed-oss-new-support-for-usb-device-with-some-retro-hardware\/#primaryimage"},"thumbnailUrl":"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/05\/27161542\/joystick-banner.png","keywords":["How To","Microcontroller Programming"],"articleSection":["Circuit Design","Embedded Development &amp; Programming"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.dmcinfo.com\/blog\/21018\/trying-out-arm-mbed-oss-new-support-for-usb-device-with-some-retro-hardware\/","url":"https:\/\/www.dmcinfo.com\/blog\/21018\/trying-out-arm-mbed-oss-new-support-for-usb-device-with-some-retro-hardware\/","name":"Trying Out ARM Mbed OS\u2019s New Support for USB Device with Some Retro Hardware | DMC, Inc.","isPartOf":{"@id":"https:\/\/www.dmcinfo.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dmcinfo.com\/blog\/21018\/trying-out-arm-mbed-oss-new-support-for-usb-device-with-some-retro-hardware\/#primaryimage"},"image":{"@id":"https:\/\/www.dmcinfo.com\/blog\/21018\/trying-out-arm-mbed-oss-new-support-for-usb-device-with-some-retro-hardware\/#primaryimage"},"thumbnailUrl":"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/05\/27161542\/joystick-banner.png","datePublished":"2019-08-30T09:24:58+00:00","dateModified":"2026-02-05T16:02:02+00:00","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dmcinfo.com\/blog\/21018\/trying-out-arm-mbed-oss-new-support-for-usb-device-with-some-retro-hardware\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dmcinfo.com\/blog\/21018\/trying-out-arm-mbed-oss-new-support-for-usb-device-with-some-retro-hardware\/#primaryimage","url":"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/05\/27161542\/joystick-banner.png","contentUrl":"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/05\/27161542\/joystick-banner.png","width":925,"height":400,"caption":"joystick-banner"},{"@type":"WebSite","@id":"https:\/\/www.dmcinfo.com\/#website","url":"https:\/\/www.dmcinfo.com\/","name":"DMC, Inc.","description":"","publisher":{"@id":"https:\/\/www.dmcinfo.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dmcinfo.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.dmcinfo.com\/#organization","name":"DMC, Inc.","url":"https:\/\/www.dmcinfo.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dmcinfo.com\/#\/schema\/logo\/image\/","url":"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/05\/27171146\/dmc-logo-1.png","contentUrl":"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/05\/27171146\/dmc-logo-1.png","width":418,"height":167,"caption":"DMC, Inc."},"image":{"@id":"https:\/\/www.dmcinfo.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/pages\/DMC-Inc\/107982009242929","https:\/\/www.instagram.com\/dmcengineering","https:\/\/www.youtube.com\/DMCEngineering","https:\/\/www.linkedin.com\/company\/dmc-engineering"]},{"@type":"Person","@id":"https:\/\/www.dmcinfo.com\/#\/schema\/person\/eab178041edfa6657dc10afa8e001e13","name":"DMC","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dmcinfo.com\/#\/schema\/person\/image\/","url":"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/06\/27185251\/dmc-avatar.png","contentUrl":"https:\/\/cdn.dmcinfo.com\/wp-content\/uploads\/2025\/06\/27185251\/dmc-avatar.png","caption":"DMC"},"url":"https:\/\/www.dmcinfo.com\/blog\/author\/dmc\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dmcinfo.com\/wp-json\/wp\/v2\/posts\/21018","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dmcinfo.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dmcinfo.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dmcinfo.com\/wp-json\/wp\/v2\/users\/322"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dmcinfo.com\/wp-json\/wp\/v2\/comments?post=21018"}],"version-history":[{"count":2,"href":"https:\/\/www.dmcinfo.com\/wp-json\/wp\/v2\/posts\/21018\/revisions"}],"predecessor-version":[{"id":38235,"href":"https:\/\/www.dmcinfo.com\/wp-json\/wp\/v2\/posts\/21018\/revisions\/38235"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dmcinfo.com\/wp-json\/wp\/v2\/media\/21019"}],"wp:attachment":[{"href":"https:\/\/www.dmcinfo.com\/wp-json\/wp\/v2\/media?parent=21018"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dmcinfo.com\/wp-json\/wp\/v2\/categories?post=21018"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dmcinfo.com\/wp-json\/wp\/v2\/tags?post=21018"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}