{"action":"created","issue":{"url":"https://api.github.com/repos/KevinOConnor/klipper/issues/767","repository_url":"https://api.github.com/repos/KevinOConnor/klipper","labels_url":"https://api.github.com/repos/KevinOConnor/klipper/issues/767/labels{/name}","comments_url":"https://api.github.com/repos/KevinOConnor/klipper/issues/767/comments","events_url":"https://api.github.com/repos/KevinOConnor/klipper/issues/767/events","html_url":"https://github.com/KevinOConnor/klipper/pull/767","id":369018138,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIyMDU2Mjc4","number":767,"title":"Full i2c support and SX1509 I2C-to-GPIO expander","user":{"login":"FHeilmann","id":4352664,"node_id":"MDQ6VXNlcjQzNTI2NjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/4352664?v=4","gravatar_id":"","url":"https://api.github.com/users/FHeilmann","html_url":"https://github.com/FHeilmann","followers_url":"https://api.github.com/users/FHeilmann/followers","following_url":"https://api.github.com/users/FHeilmann/following{/other_user}","gists_url":"https://api.github.com/users/FHeilmann/gists{/gist_id}","starred_url":"https://api.github.com/users/FHeilmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FHeilmann/subscriptions","organizations_url":"https://api.github.com/users/FHeilmann/orgs","repos_url":"https://api.github.com/users/FHeilmann/repos","events_url":"https://api.github.com/users/FHeilmann/events{/privacy}","received_events_url":"https://api.github.com/users/FHeilmann/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2018-10-11T08:55:54Z","updated_at":"2018-10-16T00:49:05Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/KevinOConnor/klipper/pulls/767","html_url":"https://github.com/KevinOConnor/klipper/pull/767","diff_url":"https://github.com/KevinOConnor/klipper/pull/767.diff","patch_url":"https://github.com/KevinOConnor/klipper/pull/767.patch"},"body":"This is my recent work to extend klipper to support i2c devices in a generic way and add an additional i2c device to the mix: The SX1509 I2C-to-16GPIO expander found on the duex5 and duex2 generation of boards.\r\n\r\nI split the contribution into 3 commits to make bisecting the whole thing easier. Please let me know about any feedback you might have.\r\n\r\nOne thing that is definitely missing is to align the implementations of the mcp4451 extra and the lpc176x i2c implementation to use this more universal approach. Since I don't have a lpc176x myself, I think it would be best if someone else dealt with that. I can, of course, try and offer up my findings for review.\r\n\r\nBests,\r\n\r\nFlorian"},"comment":{"url":"https://api.github.com/repos/KevinOConnor/klipper/issues/comments/430062758","html_url":"https://github.com/KevinOConnor/klipper/pull/767#issuecomment-430062758","issue_url":"https://api.github.com/repos/KevinOConnor/klipper/issues/767","id":430062758,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMDA2Mjc1OA==","user":{"login":"KevinOConnor","id":3004890,"node_id":"MDQ6VXNlcjMwMDQ4OTA=","avatar_url":"https://avatars3.githubusercontent.com/u/3004890?v=4","gravatar_id":"","url":"https://api.github.com/users/KevinOConnor","html_url":"https://github.com/KevinOConnor","followers_url":"https://api.github.com/users/KevinOConnor/followers","following_url":"https://api.github.com/users/KevinOConnor/following{/other_user}","gists_url":"https://api.github.com/users/KevinOConnor/gists{/gist_id}","starred_url":"https://api.github.com/users/KevinOConnor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KevinOConnor/subscriptions","organizations_url":"https://api.github.com/users/KevinOConnor/orgs","repos_url":"https://api.github.com/users/KevinOConnor/repos","events_url":"https://api.github.com/users/KevinOConnor/events{/privacy}","received_events_url":"https://api.github.com/users/KevinOConnor/received_events","type":"User","site_admin":false},"created_at":"2018-10-16T00:49:05Z","updated_at":"2018-10-16T00:49:05Z","author_association":"OWNER","body":"Hi @FHeilmann .  I apologize for wasting your time.  Your trace indicates the mcu is generating a \"stop\" followed by a \"start\" when we want a \"repeated start\" transaction.  That's surprising as a repeat start is a pretty common part of the i2c spec (for example, the sam4 docs go into great detail on how they are handled when the chip is in \"slave\" mode.)\r\n\r\nI think I better understand and agree with your original implementation of i2c_read.\r\n\r\nI do, however, think we should have i2c_write pass the register as part of the payload (eg, \"i2c_write oid=%c data=%*s\").  (And thus not use iadr on sam4 for transmit only transactions.)  I think that is more in keeping with the i2c specs and will be easier to implement on other chips.\r\n\r\nThoughts?\r\n-Kevin"}}
{"actor":{"display_login":"KevinOConnor"}}