
{"id":13128,"date":"2021-09-05T14:40:46","date_gmt":"2021-09-05T05:40:46","guid":{"rendered":"https:\/\/okiraku-camera.tokyo\/blog\/?p=13128"},"modified":"2021-09-10T12:03:55","modified_gmt":"2021-09-10T03:03:55","slug":"isp1807micro%e3%83%9c%e3%83%bc%e3%83%89%e7%94%a8%e3%81%aeusb-host-shield-library2-0%e3%81%ae%e4%bf%ae%e6%ad%a3","status":"publish","type":"post","link":"https:\/\/okiraku-camera.tokyo\/blog\/?p=13128","title":{"rendered":"ISP1807Micro\u30dc\u30fc\u30c9\u7528\u306eUSB Host Shield Library2.0\u306e\u4fee\u6b63"},"content":{"rendered":"<h1>\u6982\u8981<\/h1>\n<p>ISP1807Micro\u30dc\u30fc\u30c9\u3068mini USB Host Shield\u3092\u7d44\u307f\u5408\u308f\u305b\u3066\u4f7f\u3048\u308b\u3088\u3046\u306b\u3057\u305f\u8a71\u3002<\/p>\n<p><strong>\u8ffd\u8a18\u00a0<\/strong>\u30b9\u30a4\u30c3\u30c1\u30b5\u30a4\u30a8\u30f3\u30b9\u793e\u306enRF52 Arduino\u30dc\u30fc\u30c9\u30b5\u30dd\u30fc\u30c8\u30d1\u30c3\u30b1\u30fc\u30b8(BSP)\u306e0.1.9\u7248\u304c\u516c\u958b\u3055\u308c\u3001\u672c\u6587(boards.txt\u3084#ifdef\u306b\u95a2\u3059\u308b\u304f\u3060\u308a)\u3092\u66f8\u304d\u76f4\u3057\u307e\u3057\u305f\u3002<\/p>\n<figure id=\"attachment_13137\" aria-describedby=\"caption-attachment-13137\" style=\"width: 552px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2021\/08\/34640f7795ba5d1207a64e05e37670cf.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-13137\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2021\/08\/34640f7795ba5d1207a64e05e37670cf-552x414.jpg\" alt=\"\" width=\"552\" height=\"414\" \/><\/a><figcaption id=\"caption-attachment-13137\" class=\"wp-caption-text\">ISP1807Micro + miniUHS<\/figcaption><\/figure>\n<ul>\n<li>Nordic nRF52840\u30d9\u30fc\u30b9\u306e<a href=\"https:\/\/www.switch-science.com\/catalog\/6939\/\" target=\"_blank\" rel=\"noopener noreferrer\">ISP1807 Micro\u30dc\u30fc\u30c9(\u30b9\u30a4\u30c3\u30c1\u30b5\u30a4\u30a8\u30f3\u30b9)<\/a>\u306b\u3001<strong>mini USB Host Shield <\/strong>(\u4ee5\u4e0b\u3001miniUHS)\u3092\u63a5\u7d9a\u3059\u308b\u3002<\/li>\n<li>8MHz\/3.3V\u7248\u306eSparkFun ProMicro(\u4e92\u63db\u54c1)\u3068\u63a5\u7d9a\u3057\u305f\u3068\u304d\u306e\u3088\u3046\u306b\u3001\u5199\u771f\u306e\u3088\u3046\u306a2\u968e\u5efa\u3066\u4ed5\u7acb\u3066\u306b\u3059\u308b(1\u968e\u304cminiUHS\u30672\u968e\u304cISP1807 Micro)\u30022\u968e\u90e8\u5206\u306e\u30de\u30a4\u30b3\u30f3\u30dc\u30fc\u30c9\u3092\u5dee\u3057\u66ff\u3048\u308b\u3060\u3051\u3067\u6e08\u307e\u305b\u308b\u3002<\/li>\n<li>Arduino\u30e9\u30a4\u30d6\u30e9\u30ea\u3068\u3057\u3066\u63d0\u4f9b\u3055\u308c\u3066\u3044\u308b<a href=\"https:\/\/downloads.arduino.cc\/libraries\/github.com\/felis\/USB_Host_Shield_Library_2_0-1.6.0.zip\"> USB Host Shield Library (1.6\u7248)<\/a> \u306b\u30d1\u30c3\u30c1\u3092\u3042\u3066\u3066\u3001ISP1807 Micro\u304b\u3089\u5229\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u3002<\/li>\n<\/ul>\n<p>\u3075\u3064\u3046\u306eUSB\u30ad\u30fc\u30dc\u30fc\u30c9\u3092\u307b\u307cNICOLA\u30ad\u30fc\u30dc\u30fc\u30c9(\u89aa\u6307\u30b7\u30d5\u30c8\u30ad\u30fc\u30dc\u30fc\u30c9)\u306e\u3088\u3046\u306b\u4f7f\u3046\u305f\u3081\u306ehoboNicola\u30e9\u30a4\u30d6\u30e9\u30ea\u3092ISP1807\u306b\u79fb\u690d\u3059\u308b\u306b\u3042\u305f\u3063\u3066\u3001\u307e\u305a\u306fUSB\u30ad\u30fc\u30dc\u30fc\u30c9\u306e\u5165\u529b\u3092\u53d7\u3051\u53d6\u308b\u305f\u3081\u306e USB Host\u6a5f\u80fd\u3092\u8ffd\u52a0\u3057\u305f\u8a71\u3002<\/p>\n<h2>miniUHS\u306e\u52a0\u5de5\u306a\u3069<\/h2>\n<p>miniUHS\u306e\u6982\u8981\u3084\u52a0\u5de5\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306f\u3001ProMicro\u306b\u63a5\u7d9a\u3057\u305f\u3068\u304d\u3068\u307e\u3063\u305f\u304f\u540c\u3058\u306a\u306e\u3067\u3001\u4ee5\u4e0b\u306e\u6295\u7a3f\u3092\u53c2\u7167\u306e\u3053\u3068\u3002<\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"3WCsoxNvWB\"><p><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/?p=8092\">Pro Micro\u306bmini USB Host\u30b7\u30fc\u30eb\u30c9\u3092\u4ed8\u3051\u3066USB\u30ad\u30fc\u30dc\u30fc\u30c9\u3092\u63a5\u7d9a\u3059\u308b<\/a><\/p><\/blockquote>\n<p><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;Pro Micro\u306bmini USB Host\u30b7\u30fc\u30eb\u30c9\u3092\u4ed8\u3051\u3066USB\u30ad\u30fc\u30dc\u30fc\u30c9\u3092\u63a5\u7d9a\u3059\u308b&#8221; &#8212; \u6771\u4eac\u304a\u6c17\u697d\u30ab\u30e1\u30e9\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/?p=8092&#038;embed=true#?secret=8D0lxSGOh9#?secret=3WCsoxNvWB\" data-secret=\"3WCsoxNvWB\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<p>miniUHS\u306b\u3064\u3044\u3066\u5fd8\u308c\u3066\u3044\u308b\u3053\u3068\u3084\u3001\u8aad\u307f\u8fd4\u3057\u3066\u307f\u3066\u8db3\u308a\u306a\u3044\u90e8\u5206\u3082\u3042\u308b\u306e\u3067\u3001\u3082\u3046\u3061\u3087\u3063\u3068\u66f8\u304d\u8db3\u3057\u3066\u304a\u304f\u3002<\/p>\n<h3>miniUHS\u306e\u56de\u8def\u306e\u6982\u7565<\/h3>\n<p>aliexpress\u3084amazon\u3067\u58f2\u3063\u3066\u3044\u308bminiUHS \u306b\u306f\u3044\u304f\u3064\u304b\u306e\u30d0\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u304c\u3042\u308b\u304c\u3001\u304a\u304a\u3080\u306d\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30b7\u30f3\u30d7\u30eb\u306a\u5916\u89b3\u3067\u3001USB A\u306e\u30ec\u30bb\u30d7\u30bf\u30af\u30eb\u306b\u30ad\u30fc\u30dc\u30fc\u30c9\u3084\u30de\u30a6\u30b9\u3001\u3042\u308b\u3044\u306f\u30b2\u30fc\u30e0\u30d1\u30c3\u30c9\u306a\u3069\u306e\u5468\u8fba\u6a5f\u5668\u306e\u30b1\u30fc\u30d6\u30eb\u3092\u63a5\u7d9a\u3057\u3001\u305d\u308c\u3092Arduino\u306e\u3088\u3046\u306a\u30de\u30a4\u30b3\u30f3\u30dc\u30fc\u30c9\u3067\u5229\u7528\u3059\u308b\u305f\u3081\u306b\u7528\u3044\u308b\u3002<\/p>\n<figure id=\"attachment_13131\" aria-describedby=\"caption-attachment-13131\" style=\"width: 552px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2021\/08\/acb4e49bf2c8e167a9d8b76d38a17510.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-13131\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2021\/08\/acb4e49bf2c8e167a9d8b76d38a17510-552x414.jpg\" alt=\"\" width=\"552\" height=\"414\" \/><\/a><figcaption id=\"caption-attachment-13131\" class=\"wp-caption-text\">miniUHS \u8868<\/figcaption><\/figure>\n<p>miniUHS\u306b\u306f\u3001<a href=\"https:\/\/www.maximintegrated.com\/jp\/products\/interface\/controllers-expanders\/MAX3421E.html\" target=\"_blank\" rel=\"noopener noreferrer\">Maxim\u793e\u306eSPI\u4ed8\u304dUSB\u30da\u30ea\u30d5\u30a7\u30e9\u30eb\uff0f\u30db\u30b9\u30c8\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u306eMAX3421E<\/a>\u3068\u3044\u3046\u30c7\u30d0\u30a4\u30b9\u304c\u8f09\u3063\u3066\u304a\u308a\u3001\u3060\u3044\u305f\u3044\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u56de\u8def\u69cb\u6210\u306b\u306a\u3063\u3066\u3044\u308b\u3002<\/p>\n<figure id=\"attachment_13130\" aria-describedby=\"caption-attachment-13130\" style=\"width: 552px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2021\/08\/miniUHS_Internal.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-13130\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2021\/08\/miniUHS_Internal-552x345.png\" alt=\"\" width=\"552\" height=\"345\" \/><\/a><figcaption id=\"caption-attachment-13130\" class=\"wp-caption-text\">miniUHS<\/figcaption><\/figure>\n<p>\u3053\u306e\u56f3\u9762\u306e\u914d\u7dda\u306e\u3046\u3061\u3001\u5b9f\u7dda\u306fminiUHS\u306e\u57fa\u677f\u4e0a\u306e\u914d\u7dda\u3067\u3001\u70b9\u7dda\u306f\u6539\u9020\u3057\u305f\u3042\u3068\u306e\u914d\u7dda\u306b\u306a\u308b\u3002\u30d0\u30c3\u30c6\u30f3\u3092\u4ed8\u3051\u3066\u3042\u308b\u7b87\u6240\u3067\u30d1\u30bf\u30fc\u30f3\u30ab\u30c3\u30c8\u3059\u308b\u3002\u5916\u90e8\u63a5\u7d9a\u30d4\u30f3\u306e <strong>23\/GND<\/strong>\u3068\u304b <strong>12\/D9<\/strong> \u3068\u3044\u3046\u8868\u8a18\u306fProMicro (\u4eca\u56de\u306fISP1807Micro) \u306e\u30d4\u30f3\u756a\u53f7(\u4ee5\u4e0b\u306e\u56de\u8def\u56f3\u53c2\u7167)\u3068ProMicro\u3067\u306eArduino\u98a8\u306e\u30c7\u30b8\u30bf\u30eb\u30d4\u30f3\u540d\u3092\u793a\u3057\u305f\u3082\u306e\u3002<\/p>\n<p>\u4ee5\u4e0b\u304c\u30d1\u30c3\u30c1\u306e\u65bd\u5de5\u4f8b\u306b\u306a\u308b\u3002<\/p>\n<figure id=\"attachment_8095\" aria-describedby=\"caption-attachment-8095\" style=\"width: 552px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2018\/09\/ae0abdbcf7099949d8d77760b4ceb51c.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-8095\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2018\/09\/ae0abdbcf7099949d8d77760b4ceb51c-552x414.jpg\" alt=\"miniUHS\" width=\"552\" height=\"414\" \/><\/a><figcaption id=\"caption-attachment-8095\" class=\"wp-caption-text\">miniUHS\u306b\u30d1\u30c3\u30c1<\/figcaption><\/figure>\n<p>\u3082\u3068\u3082\u3068\u306e\u56de\u8def\u306e\u3072\u3068\u76ee\u3067\u308f\u304b\u308b\u554f\u984c\u70b9\u3068\u3057\u3066\u3001<strong>USB\u306eVBUS\u304cVCC(+3.3V)\u306b\u63a5\u7d9a<\/strong>\u3055\u308c\u3066\u3044\u308b\u3002VBUS\u96fb\u5727\u306fUSB2.0\u306e\u898f\u7a0b\u3067\u306f4.75\u301c5.25V\u306a\u306e\u3067\u30013.3V\u3067\u306f\u30ad\u30fc\u30dc\u30fc\u30c9\u306a\u3069\u306e\u5468\u8fba\u6a5f\u5668\u304c\u3061\u3083\u3093\u3068\u6a5f\u80fd\u3059\u308b\u3068\u306f\u601d\u3048\u306a\u3044(\u8a66\u3057\u3066\u3044\u307e\u305b\u3093\u304c)\u3002<br \/>\n\u305d\u306e\u4ed6\u3001Arduino ProMini\u3068SparkFun ProMicro\u306e\u30d4\u30f3\u914d\u7f6e\u306e\u9055\u3044\u304c\u3042\u3063\u305f\u308a\u3001\u88cf\u9762\u306e\u30b7\u30eb\u30af\u306b\u30ef\u30ca\u304c\u3042\u3063\u305f\u308a\u3068\u3044\u308d\u3044\u308d\u554f\u984c\u306f\u3042\u308b\u304c\u3001MAX3421E\u3092\u624b\u8efd\u306b\u5229\u7528\u3059\u308b\u306b\u306f\u90fd\u5408\u304c\u3044\u3044\u57fa\u677f\u3068\u601d\u3046\u3002<\/p>\n<p>\u306a\u304a\u3001\u73fe\u5728MAX3421E\u5358\u4f53\u306f1000\u500b\u8cb7\u3063\u3066@750\u5186\u304f\u3089\u3044\u306e\u3088\u3046\u3060\u304c\u3001\u6570\u5e74\u524d\u306b\u3053\u306eminiUHS\u30925\u679a\u307b\u3069\u8cb7\u3063\u305f\u3068\u304d\u306e\u5024\u6bb5\u306f\u9001\u6599\u8fbc\u307f\u3067@550\u5186\u304f\u3089\u3044\u3060\u3063\u305f\u3002<\/p>\n<h3>ISP1807Micro\u3068\u306e\u63a5\u7d9a<\/h3>\n<p>\u4e0a\u8a18\u306e\u3088\u3046\u306a\u52a0\u5de5\u3092\u884c\u3063\u305fminiUHS\u3068ISP1807Micro\u306e\u63a5\u7d9a\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308b\u3002\u4ee5\u524d\u3001miniUHS\u3068\u7d44\u307f\u5408\u308f\u305b\u3066\u3044\u305fProMicro\u3092\u30bd\u30b1\u30c3\u30c8\u304b\u3089\u629c\u304d\u3001\u4ee3\u308f\u308a\u306bISP1807Micro\u3092\u5dee\u3057\u305f\u3060\u3051\u3067\u3042\u308b\u3002<\/p>\n<figure id=\"attachment_13168\" aria-describedby=\"caption-attachment-13168\" style=\"width: 552px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2021\/09\/ISP1807_MB_MINI_UHS1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-13168 size-large\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2021\/09\/ISP1807_MB_MINI_UHS1-552x394.png\" alt=\"\" width=\"552\" height=\"394\" \/><\/a><figcaption id=\"caption-attachment-13168\" class=\"wp-caption-text\">ISP1807Micro + miniUHS<\/figcaption><\/figure>\n<p>ISP1807Micro\u306e\u30d4\u30f3\u540d\u79f0\u3068\u3057\u3066\u3001<strong>D9 \/ P0_26<\/strong> \u3068\u3044\u3063\u305f\u66f8\u304d\u65b9\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u306f\u3001D9\u304cArduino\u6d41\u306e\u30c7\u30b8\u30bf\u30eb\u30d4\u30f3\u540d\u3067\u3001P0_26 \u304cnRF52840\u306eGPIO\u30dd\u30fc\u30c8\u756a\u53f7\u306b\u306a\u308b\u3002GPIO\u30dd\u30fc\u30c8\u756a\u53f7\u3068Arduino\u306eDxx\u3068\u306e\u95a2\u4fc2\u306f\u3001\u30b9\u30a4\u30c3\u30c1\u30b5\u30a4\u30a8\u30f3\u30b9\u793e\u304c\u516c\u958b\u3057\u3066\u3044\u308b\u3053\u306e\u30dc\u30fc\u30c9\u306e variant.h \u3084\u56de\u8def\u56f3\u3067\u308f\u304b\u308b\u3002<\/p>\n<p>ISP1807Micro\u306b\u306f\u30aa\u30f3\u30dc\u30fc\u30c9\u306eLED\u304c1\u3064\u3057\u304b\u306a\u3044\u306e\u3067\u3001\u30b9\u30b1\u30c3\u30c1\u306e\u30c6\u30b9\u30c8\u3084\u5b9f\u9a13\u7528\u306b\u30d6\u30ec\u30c3\u30c9\u30dc\u30fc\u30c9\u306e\u9699\u9593\u306bLED\u30923\u3064\u5897\u8a2d\u3057\u305f\u3002<\/p>\n<h2>USB Host Shield Library 2.0 \u306e\u4fee\u6b63<\/h2>\n<p>miniUHS\u3092AVR\u306eArduino\u3084ESP32\u30d9\u30fc\u30b9\u306e\u3044\u308d\u3044\u308d\u3068\u3044\u3063\u305f\u3001\u30bd\u30d5\u30c8\u306e\u958b\u767a\u306bArduino IDE\u3092\u4f7f\u3048\u308b\u5404\u7a2e\u30de\u30a4\u30b3\u30f3\u30dc\u30fc\u30c9\u306b\u3064\u306a\u3044\u3067\u4f7f\u3046\u3068\u304d\u306f\u3001<strong><a href=\"https:\/\/www.arduino.cc\/reference\/en\/libraries\/usb-host-shield-library-2.0\/\" target=\"_blank\" rel=\"noopener noreferrer\">USB Host Shield Library 2.0 <\/a><\/strong>(\u4ee5\u4e0b\u3001<strong>UHS Library2.0<\/strong>) \u3092\u4f7f\u3046\u306e\u304c\u5b9a\u756a\u3060\u3068\u601d\u3046\u3002\u3057\u304b\u3057\u306a\u304c\u3089\u3001\u3053\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u306fISP1807 Micro\u30dc\u30fc\u30c9\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044\u306e\u3067\u3001\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u4e00\u90e8(\u307b\u3093\u306e\u4e00\u90e8)\u3092\u4fee\u6b63\u3057\u3066\u5229\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u305f\u3002\u73fe\u5728\u306e\u3068\u3053\u308d\u3001Arduino IDE\u306e <strong>\u30c4\u30fc\u30eb\uff0f\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u7ba1\u7406 <\/strong>\u3067\u958b\u304f<strong>\u30e9\u30a4\u30d6\u30e9\u30ea\u30de\u30cd\u30fc\u30b8\u30e3<\/strong> \u3092\u4f7f\u3063\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u308b\u30d0\u30fc\u30b8\u30e7\u30f3\u306f1.6.0\u306a\u306e\u3067\u3053\u308c\u3092\u5bfe\u8c61\u3068\u3057\u305f\u3002<\/p>\n<p>USB Host Shield Library2.0 \u306e\u30e9\u30a4\u30bb\u30f3\u30b9\u306fGPL\u3067\u3042\u308b\u3002\u3057\u305f\u304c\u3063\u3066\u3001\u4eca\u56de\u306e\u30d1\u30c3\u30c1\u3092\u9069\u7528\u3057\u305f\u30e9\u30a4\u30d6\u30e9\u30ea\u3084\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u5229\u7528\u3057\u305f\u30d7\u30ed\u30b0\u30e9\u30e0\u306b\u3082\u540c\u69d8\u306bGPL\u304c\u9069\u7528\u3055\u308c\u308b\u3002\u8ffd\u52a0\u90e8\u5206\u306b\u3064\u3044\u3066\u306f\u672c\u6587\u4e2d\u306b\u8a18\u8f09\u3057\u3001\u4fee\u6b63\u3057\u305f\u30e9\u30a4\u30d6\u30e9\u30ea\u5168\u4f53\u306f\u5f53\u30b5\u30a4\u30c8\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u305f\u3002<\/p>\n<h3>UHS Library2.0\u306e\u591a\u6a5f\u7a2e\u5bfe\u5fdc\u3068ISP1807Micro\u30dc\u30fc\u30c9\u3078\u306e\u5bfe\u5fdc<\/h3>\n<p>\u3053\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u306f\u3001\u3044\u308d\u3044\u308d\u306a\u30dc\u30fc\u30c9\u306e\u5916\u90e8\u30d4\u30f3\u63a5\u7d9a\u3084\u30de\u30a4\u30b3\u30f3\u3054\u3068\u306e\u76f8\u9055\u3092\u5438\u53ce\u3059\u308b\u305f\u3081\u306b <em>#ifdef xxx<\/em> \u3084 <em>#if defined(xxx)<\/em>\u00a0 \u3068\u3044\u3063\u305f\u6761\u4ef6\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\u3067\u5207\u308a\u5206\u3051\u3089\u308c\u3066\u3044\u308b\u3002\u7279\u306b\u3001<em><strong>avrpins.h<\/strong><\/em> \u3068 <em><strong>usbhost.h<\/strong><\/em> \u306e2\u3064\u306e\u30d8\u30c3\u30c0\u30d5\u30a1\u30a4\u30eb\u5185\u3067\u3001CPU\u30b3\u30a2\u306e\u7a2e\u985e\u3060\u3063\u305f\u308aSPI\u30e9\u30a4\u30f3\u306b\u63a5\u7d9a\u3055\u308c\u3066\u3044\u308bGPIO\u30dd\u30fc\u30c8\u306e\u64cd\u4f5c\u65b9\u6cd5\u3084GPIO\u30d4\u30f3\u756a\u53f7\u306e\u76f8\u9055\u3060\u3063\u305f\u308a\u3092\u5438\u53ce\u3057\u3001\u3055\u307e\u3056\u307e\u306a\u30dc\u30fc\u30c9\u3078\u306e\u5bfe\u5fdc\u304c\u56f3\u3089\u308c\u3066\u3044\u308b\u3002\u540c\u3058\u3088\u3046\u306bISP1807Micro \u30dc\u30fc\u30c9\u3078\u306e\u5bfe\u5fdc\u3092\u8ffd\u52a0\u3059\u308b\u3053\u3068\u306b\u3057\u305f\u3002<\/p>\n<h4>avrpins.h\u3078\u306e\u8ffd\u52a0<\/h4>\n<p>UHS Library2.0 \u306enRF52840\u305d\u306e\u3082\u306e\u3078\u306e\u5bfe\u5fdc\u306f2021\u5e743\u6708\u306e1.5\u7248\u3067\u8ffd\u52a0\u3055\u308c\u3066\u3044\u305f\u3088\u3046\u3067\u30011.6\u7248\u306b\u3082\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30d6\u30ed\u30c3\u30af\u304c\u3042\u308b\u3002<\/p>\n<pre class=\"lang:default decode:true\">... #elif\u00a0 defined(ARDUINO_NRF52840_FEATHER) ...<\/pre>\n<p>\u3053\u306e <em><strong>ARDUINO_NRF52840_FEATHER<\/strong><\/em> \u3068\u3044\u3046\u30de\u30af\u30ed\u306f\u3001Adafruit\u306enrf52\u306eboards.txt\u306b\u3042\u308b\u3001<span class=\"lang:default highlight:0 decode:true crayon-inline\">feather52840.build.board=NRF52840_FEATHER<\/span>\u00a0 \u306b\u7531\u6765\u3057\u3066\u3044\u3066 Adafruit\u793e\u306e\u00a0<strong><span style=\"font-family: helvetica, arial, sans-serif;\">Bluefruit Feather nRF52840 Express<\/span> <\/strong>\u3068\u3044\u3046\u30dc\u30fc\u30c9\u306e\u8b58\u5225\u5b50\u306b\u306a\u3063\u3066\u3044\u308b\u3002Arduino\u306eboards.txt\u3084platform.txt\u3068\u30d3\u30eb\u30c9\u30c4\u30fc\u30eb\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3084\u30de\u30af\u30ed\u306e\u95a2\u4fc2\u306b\u3064\u3044\u3066\u306f\u3001<a href=\"https:\/\/arduino.github.io\/arduino-cli\/latest\/platform-specification\/\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/arduino.github.io\/arduino-cli\/latest\/platform-specification\/<\/a> \u3092\u53c2\u7167\u3002<\/p>\n<p>ISP1807 Micro\u30dc\u30fc\u30c9\u306eboards.txt\u3092\u898b\u308b\u3068\u3001<\/p>\n<pre class=\"lang:default decode:true \">isp1807microboard.build.board=SSCI_ISP1807_MICRO_BOARD\r\n<\/pre>\n<p>\u3068\u66f8\u3044\u3066\u3042\u308b\u306e\u3067\u3001\u30d3\u30eb\u30c9\u6642\u306b\u306f\u30de\u30af\u30ed\u00a0 <em><strong>ARDUINO_<\/strong><strong>SSCI_ISP1807_MICRO_BOARD<\/strong> <\/em>\u304c\u5b9a\u7fa9\u6e08\u307f\u3068\u306a\u308b\u3002\u306a\u304a\u3001\u3053\u306e\u30de\u30af\u30ed\u306fBSP 0.1.9\u7248\u304b\u3089\u6709\u52b9\u3067\u3001\u305d\u308c\u4ee5\u524d\u306e\u7248\u306eBSP\u3092\u3064\u304b\u3063\u3066\u3044\u308b\u5834\u5408\u3001\u81ea\u5206\u3067boards.txt \u3092\u7de8\u96c6\u3059\u308b\u306a\u308a\u3057\u3066\u30e6\u30cb\u30fc\u30af\u306a\u30de\u30af\u30ed\u3092\u5b9a\u7fa9\u3057\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308b\u3002<\/p>\n<p><em><strong>ARDUINO_<\/strong><strong>SSCI_ISP1807_MICRO_BOARD<\/strong> \u3092\u3064\u304b\u3063\u3066<\/em>avrpins.h\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u65ad\u7247\u3092\u8ffd\u52a0\u3057\u305f\u3002<\/p>\n<pre class=\"lang:default decode:true\">#elif defined(ARDUINO_SSCI_ISP1807_MICRO_BOARD)\t\/\/ ISP1807 MB\r\n#define MAKE_PIN(className, pin) \\\r\nclass className { \\\r\npublic: \\\r\n    static void Set() { \\\r\n        nrf_gpio_pin_set(pin); \\\r\n    } \\\r\n    static void Clear() { \\\r\n        nrf_gpio_pin_clear(pin); \\\r\n    } \\\r\n    static void SetDirRead() { \\\r\n        nrf_gpio_cfg_input(pin, NRF_GPIO_PIN_NOPULL); \\\r\n    } \\\r\n    static void SetDirWrite() { \\\r\n        nrf_gpio_cfg_output(pin); \\\r\n    } \\\r\n    static uint8_t IsSet() { \\\r\n        return (uint8_t)nrf_gpio_pin_read(pin); \\\r\n    } \\\r\n};\r\nMAKE_PIN(P15, (6));  \/\/ SCK \r\nMAKE_PIN(P14, (8));  \/\/ MISO \r\nMAKE_PIN(P9,  (26)); \/\/ INT(D9)\r\nMAKE_PIN(P10, (17)); \/\/ SS(D10)\r\nMAKE_PIN(P16, (10)); \/\/ MOSI \r\n\r\n#undef MAKE_PIN<\/pre>\n<p>\u3053\u306e\u65ad\u7247\u3092\u4ee5\u4e0b\u306e\u4f4d\u7f6e\u306b\u633f\u5165\u3057\u305f\u3002<\/p>\n<pre class=\"lang:default decode:true\">#elif defined(ARDUINO_NRF52840_FEATHER)\r\n...\r\n#undef MAKE_PIN\r\n(\u3053\u3053\u306b\u633f\u5165)\r\n#else\r\n#error \"Please define board in avrpins.h\"\r\n...<\/pre>\n<p>MAKE_PIN()\u30de\u30af\u30ed\u306e\u6700\u521d\u306e\u5f15\u6570 <strong>Pnn<\/strong> \u306e <strong>nn <\/strong>\u306fArduino\u6d41\u306e\u30c7\u30b8\u30bf\u30eb\u30d4\u30f3\u756a\u53f7\u3068\u3057\u30012\u756a\u76ee\u306e\u5f15\u6570\u306fnRF52840\u306eGPIO\u30dd\u30fc\u30c8\u756a\u53f7\u3092\u6307\u5b9a\u3057\u3066\u3044\u308b\u3002\u305d\u306e\u4ed6\u306e\u30dd\u30fc\u30c8\u306fSPI\u306b\u306f\u95a2\u4fc2\u306a\u3044\u306e\u3067\u6307\u5b9a\u3057\u3066\u3044\u306a\u3044\u3002<\/p>\n<h4>usbhost.h\u3078\u306e\u8ffd\u52a0<\/h4>\n<p>usbhost.h\u3067\u306fSPI\u901a\u4fe1\u306b\u7528\u3044\u308b\u30dd\u30fc\u30c8\u30d4\u30f3\u306e\u5b9a\u7fa9\u3092\u8ffd\u52a0\u3059\u308b\u3002avrpins.h\u3068\u540c\u69d8\u306b\u3001<em><strong>ARDUINO_NRF52840_FEATHER<\/strong><\/em> \u306e\u30d6\u30ed\u30c3\u30af\u306e\u76f4\u4e0b\u306b\u4ee5\u4e0b\u306e2\u884c\u3092\u8ffd\u52a0\u3002<\/p>\n<pre class=\"lang:default decode:true\">#elif defined(ARDUINO_SSCI_ISP1807_MICRO_BOARD) \r\ntypedef SPi&lt; P15, P16, P14, P10 &gt; spi;<\/pre>\n<p>\u3053\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u30af\u30e9\u30b9 SPi\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308b\u3002<\/p>\n<pre class=\"lang:default decode:true\">template&lt; typename SPI_CLK, typename SPI_MOSI, typename SPI_MISO, typename SPI_SS &gt; class SPi { ...\r\n<\/pre>\n<p>\u3053\u308c\u306b\u3057\u305f\u304c\u3063\u3066\u3001SCK\u3001MOSI\u3001MISO\u3001SS\u306e\u9806\u306b\u3001avrpins.h\u3067\u5b9a\u7fa9\u3057\u305f\u30af\u30e9\u30b9\u540d( Pxx )\u3092\u4e26\u3079\u305f\u3002<\/p>\n<h4>UsbCore.h\u306e\u78ba\u8a8d<\/h4>\n<p>\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u4fee\u6b63\u306f\u4e0d\u8981\u3002avrpins.h \u306b\u8ffd\u52a0\u3057\u305f\u5b9a\u7fa9\u306b\u3088\u308a\u3001ISP1807Micro\u306b\u3064\u3044\u3066\u3082\u4e0b\u306b\u629c\u7c8b\u3057\u305f Arduino\u6a19\u6e96\u3068\u540c\u3058 SS \u3068INT \u306e\u63a5\u7d9a\u3067\u30aa\u30fc\u30b1\u30fc\u306a\u3053\u3068\u3092\u78ba\u8a8d\u3057\u305f\u3002<\/p>\n<pre class=\"lang:default decode:true\">...\r\n#else\r\ntypedef MAX3421e&lt;P10, P9&gt; MAX3421E; \/\/ Official Arduinos (UNO, Duemilanove, Mega, 2560, Leonardo, Due etc.), Intel Edison, Intel Galileo 2 or Teensy 2.0 and 3.x\r\n#endif<\/pre>\n<h2>\u52d5\u4f5c\u78ba\u8a8d<\/h2>\n<p>\u30d3\u30eb\u30c9\u3084\u52d5\u4f5c\u306e\u78ba\u8a8d\u306f\u3001UHS Library2.0 \u306b\u4ed8\u5c5e\u306eHID\u30b9\u30b1\u30c3\u30c1\u30b5\u30f3\u30d7\u30eb(examples\/HID\/USBHIDBootKbd) \u3092\u7528\u3044\u3066\u884c\u3063\u305f\u3002\u30d3\u30eb\u30c9\u3057\u3066\u30a8\u30e9\u30fc\u304c\u51fa\u306a\u3044\u3053\u3068\u3001\u30b7\u30ea\u30a2\u30eb\u30e2\u30cb\u30bf\u306b\u30ad\u30fc\u30dc\u30fc\u30c9\u3067\u53e9\u3044\u305f\u6587\u5b57\u306b\u76f8\u5f53\u3059\u308b\u51fa\u529b\u304c\u8868\u793a\u3055\u308c\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3002<\/p>\n<p>\u7279\u306b\u5de5\u592b\u3082\u306a\u3044\u306e\u3060\u304c\u3001\u30b7\u30ea\u30a2\u30eb\u30e2\u30cb\u30bf\u306b\u306f\u6253\u9375\u3057\u305f\u30ad\u30fc\u306eHID Usage ID\u3084\u4fee\u98fe\u30ad\u30fc\u306e\u540d\u524d\u304c\u8868\u793a\u3055\u308c\u305f\u304b\u3089\u3001ISP1807 Micro\u3078\u306e\u5bfe\u5fdc\u306f\u3046\u307e\u304f\u3044\u3063\u3066\u3044\u308b\u3068\u5224\u65ad\u3057\u305f\u3002<\/p>\n<figure id=\"attachment_13184\" aria-describedby=\"caption-attachment-13184\" style=\"width: 552px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2021\/09\/0d40a5e4a645fc6b96e767d64ac0878e.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-13184\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2021\/09\/0d40a5e4a645fc6b96e767d64ac0878e-552x428.png\" alt=\"\" width=\"552\" height=\"428\" \/><\/a><figcaption id=\"caption-attachment-13184\" class=\"wp-caption-text\">USBHIDBootKbd \u30b7\u30ea\u30a2\u30eb\u30e2\u30cb\u30bf\u306e\u8868\u793a<\/figcaption><\/figure>\n<h1>\u304d\u3087\u3046\u306e\u307e\u3068\u3081<\/h1>\n<p>\u4fee\u6b63\u3057\u305f\u30e9\u30a4\u30d6\u30e9\u30ea\u4e00\u5f0f\u306e<a href=\"https:\/\/okiraku-camera.tokyo\/blog\/?page_id=12997\" target=\"_blank\" rel=\"noopener noreferrer\">\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u306f\u3053\u3061\u3089\u304b\u3089<\/a>\u304a\u9858\u3044\u3057\u307e\u3059\u3002\u30e9\u30a4\u30bb\u30f3\u30b9\u306f\u30aa\u30ea\u30b8\u30ca\u30eb\u3092\u7d99\u627f\u3057\u3066GPL\u3067\u3059\u3002<\/p>\n<p>\u3053\u306e\u30d6\u30ed\u30b0\u3092\u66f8\u3044\u3066\u307e\u3082\u306a\u304f\u3001\u3042\u308b\u3044\u306f\u540c\u3058\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u30b9\u30a4\u30c3\u30c1\u30b5\u30a4\u30a8\u30f3\u30b9\u793e\u304cnRF52 Arduino\u30dc\u30fc\u30c9\u30b5\u30dd\u30fc\u30c8\u30d1\u30c3\u30b1\u30fc\u30b8 (BSP) \u3092\u66f4\u65b0\u3057\u3066\u304f\u308c\u305f\u3002\u304a\u304b\u3052\u3067\u3001boards.txt\u3092\u66f8\u304d\u63db\u3048\u3066\u30e6\u30cb\u30fc\u30af\u306a\u30dc\u30fc\u30c9\u540d\u306b\u3057\u3066\u304b\u3089\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u7de8\u96c6\u3059\u308b\u306a\u3093\u3066\u3053\u3068\u3092\u3059\u308b\u5fc5\u8981\u304c\u306a\u304f\u306a\u308a\u3001\u3053\u306e\u6295\u7a3f\u3084UHS Library2.0\u00a0 \u306e\u4fee\u6b63\u3092\u884c\u3063\u305f\u3002\u307e\u3060\u65b0\u3057\u3044\u30dc\u30fc\u30c9\u3084\u30e9\u30a4\u30d6\u30e9\u30ea\u306a\u306e\u3067\u3001\u4eca\u5f8c\u3082\u66f4\u65b0\u304c\u3042\u308b\u306e\u3060\u308d\u3046\u3002<\/p>\n<p>UHS Library2.0 \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u958b\u767a\u306f\u3001<a href=\"https:\/\/github.com\/felis\/USB_Host_Shield_2.0\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/github.com\/felis\/USB_Host_Shield_2.0<\/a> \u3067\u73fe\u5728\u3082\u7d9a\u3044\u3066\u3044\u308b\u3002\u3067\u304d\u308c\u3070ISP1807Micro\u3078\u306e\u5bfe\u5fdc\u3082\u30e9\u30a4\u30d6\u30e9\u30ea\u306b\u53d6\u308a\u8fbc\u3093\u3067\u3082\u3089\u3044\u305f\u3044\u3068\u3053\u308d\u306a\u306e\u3067\u3001\u3069\u306a\u305f\u304b\u30d7\u30eb\u3057\u3066\u3082\u3089\u3063\u3066\u304f\u308c\u307e\u305b\u3093\u304b\u306d\u3002<\/p>\n<p>UHS Library2.0 \u306eISP1807 Micro\u5bfe\u5fdc\u304c\u3067\u304d\u305f\u306e\u3067\u3001hoboNicola\u30e9\u30a4\u30d6\u30e9\u30ea\u306eTinyUSB\u30e9\u30a4\u30d6\u30e9\u30ea\u3084nRF52\u306eBLE\u5bfe\u5fdc\u3092\u884c\u3046\u4e88\u5b9a\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6982\u8981 ISP1807Micro\u30dc\u30fc\u30c9\u3068mini USB Host Shield\u3092\u7d44\u307f\u5408\u308f\u305b\u3066\u4f7f\u3048\u308b\u3088\u3046\u306b\u3057\u305f\u8a71\u3002 \u8ffd\u8a18\u00a0\u30b9\u30a4\u30c3\u30c1\u30b5\u30a4\u30a8\u30f3\u30b9\u793e\u306enRF52 Arduino\u30dc\u30fc\u30c9\u30b5\u30dd\u30fc\u30c8\u30d1\u30c3\u30b1\u30fc\u30b8(BSP)\u306e0.1.9\u7248\u304c\u516c &hellip; <a href=\"https:\/\/okiraku-camera.tokyo\/blog\/?p=13128\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">ISP1807Micro\u30dc\u30fc\u30c9\u7528\u306eUSB Host Shield Library2.0\u306e\u4fee\u6b63<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,69],"tags":[65,150,164,166,167],"class_list":["post-13128","post","type-post","status-publish","format-standard","hentry","category-pc","category-programming","tag-arduino","tag-hid","tag-isp1807","tag-miniuhs","tag-nrf52"],"_links":{"self":[{"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=\/wp\/v2\/posts\/13128","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=13128"}],"version-history":[{"count":0,"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=\/wp\/v2\/posts\/13128\/revisions"}],"wp:attachment":[{"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=13128"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=13128"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=13128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}