{"action":"created","issue":{"url":"https://api.github.com/repos/NicoHood/HID/issues/146","repository_url":"https://api.github.com/repos/NicoHood/HID","labels_url":"https://api.github.com/repos/NicoHood/HID/issues/146/labels{/name}","comments_url":"https://api.github.com/repos/NicoHood/HID/issues/146/comments","events_url":"https://api.github.com/repos/NicoHood/HID/issues/146/events","html_url":"https://github.com/NicoHood/HID/pull/146","id":353815791,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEwNzYzODkz","number":146,"title":"Port to SAMD architecture","user":{"login":"facchinm","id":8843437,"node_id":"MDQ6VXNlcjg4NDM0Mzc=","avatar_url":"https://avatars0.githubusercontent.com/u/8843437?v=4","gravatar_id":"","url":"https://api.github.com/users/facchinm","html_url":"https://github.com/facchinm","followers_url":"https://api.github.com/users/facchinm/followers","following_url":"https://api.github.com/users/facchinm/following{/other_user}","gists_url":"https://api.github.com/users/facchinm/gists{/gist_id}","starred_url":"https://api.github.com/users/facchinm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facchinm/subscriptions","organizations_url":"https://api.github.com/users/facchinm/orgs","repos_url":"https://api.github.com/users/facchinm/repos","events_url":"https://api.github.com/users/facchinm/events{/privacy}","received_events_url":"https://api.github.com/users/facchinm/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-08-24T14:51:57Z","updated_at":"2018-09-15T10:11:04Z","closed_at":"2018-09-15T09:14:29Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/NicoHood/HID/pulls/146","html_url":"https://github.com/NicoHood/HID/pull/146","diff_url":"https://github.com/NicoHood/HID/pull/146.diff","patch_url":"https://github.com/NicoHood/HID/pull/146.patch"},"body":"* Make some features AVR only (like USBDevice.wakeupHost() )\r\n* Make some code more generic (mostly EP size and different includes path)\r\n\r\nAs per mailing list discussion :slightly_smiling_face: \r\nTested with MKRVidor4000 ([samd_beta](https://github.com/arduino/ArduinoCore-samd/tree/beta), reliable) and MKRWiFI1010 (samd, unreliable RX) using https://github.com/NicoHood/HID/tree/master/extras/rawhid"},"comment":{"url":"https://api.github.com/repos/NicoHood/HID/issues/comments/421549157","html_url":"https://github.com/NicoHood/HID/pull/146#issuecomment-421549157","issue_url":"https://api.github.com/repos/NicoHood/HID/issues/146","id":421549157,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMTU0OTE1Nw==","user":{"login":"blahlicus","id":8215864,"node_id":"MDQ6VXNlcjgyMTU4NjQ=","avatar_url":"https://avatars2.githubusercontent.com/u/8215864?v=4","gravatar_id":"","url":"https://api.github.com/users/blahlicus","html_url":"https://github.com/blahlicus","followers_url":"https://api.github.com/users/blahlicus/followers","following_url":"https://api.github.com/users/blahlicus/following{/other_user}","gists_url":"https://api.github.com/users/blahlicus/gists{/gist_id}","starred_url":"https://api.github.com/users/blahlicus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blahlicus/subscriptions","organizations_url":"https://api.github.com/users/blahlicus/orgs","repos_url":"https://api.github.com/users/blahlicus/repos","events_url":"https://api.github.com/users/blahlicus/events{/privacy}","received_events_url":"https://api.github.com/users/blahlicus/received_events","type":"User","site_admin":false},"created_at":"2018-09-15T10:11:04Z","updated_at":"2018-09-15T10:11:04Z","author_association":"CONTRIBUTOR","body":"Hey, just so you know, I've went ahead and [ran several test cases](https://gist.github.com/blahlicus/c2386ccb64a8f953efbdcb9828033c82) to cover the bugs mentioned in #120 as well as to test the limits of the HID report (6KRO) to make sure it adheres to HID specs.\r\n\r\nI tested the firmware on an Arduino Zero and all tests are bug free (at least for the scope of the tests that I ran) and behaviour is the same as when I ran the tests on a Pro Micro.\r\n\r\nBUT, there are a bunch of compile warnings about casting ints to uint_8s as per below:\r\n\r\n```\r\nIn file included from C:\\Users\\blahlicus\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\samd\\1.6.19\\cores\\arduino/Arduino.h:129:0,\r\n\r\n                 from E:\\blahlicus\\Documents\\Arduino\\libraries\\HID-Project\\src\\SingleReport\\BootKeyboard.h:27,\r\n\r\n                 from E:\\blahlicus\\Documents\\Arduino\\libraries\\HID-Project\\src\\SingleReport\\BootKeyboard.cpp:24:\r\n\r\nE:\\blahlicus\\Documents\\Arduino\\libraries\\HID-Project\\src\\SingleReport\\BootKeyboard.cpp: In member function 'virtual int BootKeyboard_::getInterface(uint8_t*)':\r\n\r\nC:\\Users\\blahlicus\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\samd\\1.6.19\\cores\\arduino/USB/USBCore.h:37:56: warning: narrowing conversion of '(int)(((BootKeyboard_*)this)->BootKeyboard_::<anonymous>.PluggableUSBModule::pluggedEndpoint | 128u)' from 'int' to 'uint8_t {aka unsigned char}' inside { } [-Wnarrowing]\r\n\r\n #define USB_ENDPOINT_IN(addr)                  ((addr) | 0x80)\r\n\r\n                                                        ^\r\n```\r\n\r\nJust a fair warning maybe something will not work perfectly on SAMD21 platforms due to byte overflow (are ints in SAMD21 16 bits or 32?). All the tests are normal and my tests should cover most ordinary use cases, that being said, maybe there are fringe cases where it might bug out.\r\n\r\nOverall I think the merge is probably safe, the Arduino `PluggableHID` devs probably were too lazy to use uint_8 instead of ints when developing the port to SAMD21 which is why there are cast warnings. I won't lose sleep over it unless an actual bug is discovered by a user."}}
{"actor":{"display_login":"blahlicus"}}