{"action":"created","issue":{"url":"https://api.github.com/repos/tock/tock/issues/930","repository_url":"https://api.github.com/repos/tock/tock","labels_url":"https://api.github.com/repos/tock/tock/issues/930/labels{/name}","comments_url":"https://api.github.com/repos/tock/tock/issues/930/comments","events_url":"https://api.github.com/repos/tock/tock/issues/930/events","html_url":"https://github.com/tock/tock/issues/930","id":322299649,"number":930,"title":"Create a crate for Register/Bitfield Interface?","user":{"login":"andre-richter","id":4130005,"avatar_url":"https://avatars2.githubusercontent.com/u/4130005?v=4","gravatar_id":"","url":"https://api.github.com/users/andre-richter","html_url":"https://github.com/andre-richter","followers_url":"https://api.github.com/users/andre-richter/followers","following_url":"https://api.github.com/users/andre-richter/following{/other_user}","gists_url":"https://api.github.com/users/andre-richter/gists{/gist_id}","starred_url":"https://api.github.com/users/andre-richter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andre-richter/subscriptions","organizations_url":"https://api.github.com/users/andre-richter/orgs","repos_url":"https://api.github.com/users/andre-richter/repos","events_url":"https://api.github.com/users/andre-richter/events{/privacy}","received_events_url":"https://api.github.com/users/andre-richter/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-05-11T13:36:29Z","updated_at":"2018-05-12T17:37:11Z","closed_at":null,"author_association":"NONE","body":"Hi guys,\r\n\r\nI read your recent blog post about your register/bitfield interface. For me it was a perfect timing to learn about it, since we recently started a discussion about register R/W semantics in the Rust embedded-wg: https://github.com/rust-lang-nursery/embedded-wg/issues/87\r\n\r\nOne thing we were missing so far was a good common approach towards bitfields (bitflags was kind of straight forward through the bitflags crate). It seems your code has, among other useful functionality, a neat solution to this already.\r\nHence I am asking you if you would be open to engage in that discussion, and in that context would be open to carving out a (standalone) crate of your current code? This would make it more accessible to others.\r\n\r\nIn the discussion linked above, we also concluded that these register operations are not only applicable for MMIO, but to some extent also for CPU registers. Hence, the code could be reused even more by abstracting the reading/writing of the raw register bits according to the actual source (MMIO, CPU; Maybe introduce interface traits for it?), and share the modification functions. Another minor thing I noticed from skimming through your code is lack of u64 support, but that shouldn't be a big issue ofc.\r\n\r\nKindly let me know what you think about it. \r\n"},"comment":{"url":"https://api.github.com/repos/tock/tock/issues/comments/388570997","html_url":"https://github.com/tock/tock/issues/930#issuecomment-388570997","issue_url":"https://api.github.com/repos/tock/tock/issues/930","id":388570997,"user":{"login":"andre-richter","id":4130005,"avatar_url":"https://avatars2.githubusercontent.com/u/4130005?v=4","gravatar_id":"","url":"https://api.github.com/users/andre-richter","html_url":"https://github.com/andre-richter","followers_url":"https://api.github.com/users/andre-richter/followers","following_url":"https://api.github.com/users/andre-richter/following{/other_user}","gists_url":"https://api.github.com/users/andre-richter/gists{/gist_id}","starred_url":"https://api.github.com/users/andre-richter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andre-richter/subscriptions","organizations_url":"https://api.github.com/users/andre-richter/orgs","repos_url":"https://api.github.com/users/andre-richter/repos","events_url":"https://api.github.com/users/andre-richter/events{/privacy}","received_events_url":"https://api.github.com/users/andre-richter/received_events","type":"User","site_admin":false},"created_at":"2018-05-12T17:37:11Z","updated_at":"2018-05-12T17:37:11Z","author_association":"NONE","body":"Introducing traits to reduce boilerplate: https://github.com/andre-richter/tock/commit/40cad0cac20f2b17009ca96521ca60826ac4284a\r\n\r\nStopping here for now, in case you're not interested in this whole CPU thingy? :sweat_smile:"}}
{"actor":{"display_login":"andre-richter"}}