{"action":"created","issue":{"url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/2901","labels_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/2901/labels{/name}","comments_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/2901/comments","events_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/2901/events","html_url":"https://github.com/RIOT-OS/RIOT/pull/2901","id":72411963,"number":2901,"title":"network: make auto_init_ng_netif less board-dependant","user":{"login":"kaspar030","id":4679640,"avatar_url":"https://avatars.githubusercontent.com/u/4679640?v=3","gravatar_id":"","url":"https://api.github.com/users/kaspar030","html_url":"https://github.com/kaspar030","followers_url":"https://api.github.com/users/kaspar030/followers","following_url":"https://api.github.com/users/kaspar030/following{/other_user}","gists_url":"https://api.github.com/users/kaspar030/gists{/gist_id}","starred_url":"https://api.github.com/users/kaspar030/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaspar030/subscriptions","organizations_url":"https://api.github.com/users/kaspar030/orgs","repos_url":"https://api.github.com/users/kaspar030/repos","events_url":"https://api.github.com/users/kaspar030/events{/privacy}","received_events_url":"https://api.github.com/users/kaspar030/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/RIOT-OS/RIOT/labels/enhancement","name":"enhancement","color":"f17070"},{"url":"https://api.github.com/repos/RIOT-OS/RIOT/labels/network","name":"network","color":"bfdadc"},{"url":"https://api.github.com/repos/RIOT-OS/RIOT/labels/Request%20for%20Comments","name":"Request for Comments","color":"23F823"},{"url":"https://api.github.com/repos/RIOT-OS/RIOT/labels/WIP","name":"WIP","color":"009800"}],"state":"open","locked":false,"assignee":{"login":"haukepetersen","id":620834,"avatar_url":"https://avatars.githubusercontent.com/u/620834?v=3","gravatar_id":"","url":"https://api.github.com/users/haukepetersen","html_url":"https://github.com/haukepetersen","followers_url":"https://api.github.com/users/haukepetersen/followers","following_url":"https://api.github.com/users/haukepetersen/following{/other_user}","gists_url":"https://api.github.com/users/haukepetersen/gists{/gist_id}","starred_url":"https://api.github.com/users/haukepetersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haukepetersen/subscriptions","organizations_url":"https://api.github.com/users/haukepetersen/orgs","repos_url":"https://api.github.com/users/haukepetersen/repos","events_url":"https://api.github.com/users/haukepetersen/events{/privacy}","received_events_url":"https://api.github.com/users/haukepetersen/received_events","type":"User","site_admin":false},"milestone":null,"comments":5,"created_at":"2015-05-01T11:26:54Z","updated_at":"2015-05-01T12:29:28Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/2901","html_url":"https://github.com/RIOT-OS/RIOT/pull/2901","diff_url":"https://github.com/RIOT-OS/RIOT/pull/2901.diff","patch_url":"https://github.com/RIOT-OS/RIOT/pull/2901.patch"},"body":"PR for #2900, IMHO improves #2891.\r\n\r\nThis is work in progress, let's please discuss the concept.\r\n\r\nI've adapted ng_at86rf2xx and xbee, but only the iot-lab_M3 node.\r\nCouldn't test xbee for lack of device.\r\n"},"comment":{"url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/comments/98123155","html_url":"https://github.com/RIOT-OS/RIOT/pull/2901#issuecomment-98123155","issue_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/2901","id":98123155,"user":{"login":"authmillenon","id":675644,"avatar_url":"https://avatars.githubusercontent.com/u/675644?v=3","gravatar_id":"","url":"https://api.github.com/users/authmillenon","html_url":"https://github.com/authmillenon","followers_url":"https://api.github.com/users/authmillenon/followers","following_url":"https://api.github.com/users/authmillenon/following{/other_user}","gists_url":"https://api.github.com/users/authmillenon/gists{/gist_id}","starred_url":"https://api.github.com/users/authmillenon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/authmillenon/subscriptions","organizations_url":"https://api.github.com/users/authmillenon/orgs","repos_url":"https://api.github.com/users/authmillenon/repos","events_url":"https://api.github.com/users/authmillenon/events{/privacy}","received_events_url":"https://api.github.com/users/authmillenon/received_events","type":"User","site_admin":false},"created_at":"2015-05-01T12:29:28Z","updated_at":"2015-05-01T12:29:28Z","body":"Have look at this example:\r\n\r\n```C\r\n#include <stdio.h>\r\n\r\n#define ARRAY_SIZE  (2)\r\n\r\nstruct test {\r\n    int one;\r\n    int two;\r\n};\r\n\r\nconst struct test t_array[] = {\r\n    { 1, 2 },\r\n    { 2, 3 },\r\n};\r\n\r\nvoid output(const struct test *t, size_t t_size) {\r\n    for (int i = 0; i < t_size; i++) {\r\n        printf(\"one: %d; two: %d\\n\", t[i].one, t[i].two);\r\n    }\r\n}\r\n\r\nint main(int argc, char **argv) {\r\n    output(t_array, ARRAY_SIZE);\r\n}\r\n```\r\n\r\n```\r\n   text\t   data\t    bss\t    dec\t    hex\tfilename\r\n   1406\t    560\t      8\t   1974\t    7b6\tmain\r\n```\r\n\r\nvs.\r\n\r\n```C\r\n#include <stdio.h>\r\n\r\n#define ARRAY_SIZE  (2)\r\n\r\nstruct test {\r\n    int one;\r\n    int two;\r\n};\r\n\r\n#define ARRAY (struct test[]){ \\\r\n    { 1, 2 }, \\\r\n    { 2, 3 }, \\\r\n}\r\n\r\nvoid output(const struct test *t, size_t t_size) {\r\n    for (int i = 0; i < t_size; i++) {\r\n        printf(\"one: %d; two: %d\\n\", t[i].one, t[i].two);\r\n    }\r\n}\r\n\r\nint main(int argc, char **argv) {\r\n    output(ARRAY, ARRAY_SIZE);\r\n}\r\n```\r\n\r\n```\r\n   text\t   data\t    bss\t    dec\t    hex\tfilename\r\n   1394\t    560\t      8\t   1962\t    7aa\tmain\r\n```"}}