{"action":"opened","issue":{"url":"https://api.github.com/repos/spark/firmware/issues/437","labels_url":"https://api.github.com/repos/spark/firmware/issues/437/labels{/name}","comments_url":"https://api.github.com/repos/spark/firmware/issues/437/comments","events_url":"https://api.github.com/repos/spark/firmware/issues/437/events","html_url":"https://github.com/spark/firmware/issues/437","id":83999882,"number":437,"title":"incorrect return value for getPinMode()","user":{"login":"kennethlimcp","id":6760914,"avatar_url":"https://avatars.githubusercontent.com/u/6760914?v=3","gravatar_id":"","url":"https://api.github.com/users/kennethlimcp","html_url":"https://github.com/kennethlimcp","followers_url":"https://api.github.com/users/kennethlimcp/followers","following_url":"https://api.github.com/users/kennethlimcp/following{/other_user}","gists_url":"https://api.github.com/users/kennethlimcp/gists{/gist_id}","starred_url":"https://api.github.com/users/kennethlimcp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kennethlimcp/subscriptions","organizations_url":"https://api.github.com/users/kennethlimcp/orgs","repos_url":"https://api.github.com/users/kennethlimcp/repos","events_url":"https://api.github.com/users/kennethlimcp/events{/privacy}","received_events_url":"https://api.github.com/users/kennethlimcp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-02T12:26:25Z","updated_at":"2015-06-02T12:26:25Z","closed_at":null,"body":"Example code:\r\n\r\n```\r\n/*\r\n * @brief Returns the mode of the selected pin as type PinMode\r\n *\r\n * OUTPUT = 0\r\n * INPUT = 1\r\n * INPUT_PULLUP = 2\r\n * INPUT_PULLDOWN = 3\r\n * AF_OUTPUT_PUSHPULL = 4\r\n * AF_OUTPUT_DRAIN = 5\r\n * AN_INPUT = 6\r\n * AN_OUTPUT = 7\r\n * PIN_MODE_NONE = 255  \r\n */\r\n \r\n \r\nvoid setup(){\r\n    pinMode(D0,OUTPUT);\r\n    pinMode(D1,INPUT);\r\n    pinMode(D2,INPUT_PULLUP);\r\n    pinMode(D3,INPUT_PULLDOWN);\r\n    pinMode(D4,AF_OUTPUT_PUSHPULL);\r\n    pinMode(D5,AF_OUTPUT_DRAIN);\r\n    pinMode(D6,AN_INPUT);\r\n    pinMode(D7,AN_OUTPUT);\r\n    pinMode(A0,PIN_MODE_NONE);\r\n    \r\n    Serial.begin(9600);\r\n    while(!Serial.available()) Spark.process();\r\n    Serial.println(getPinMode(D0));\r\n    Serial.println(getPinMode(D1));\r\n    Serial.println(getPinMode(D2));\r\n    Serial.println(getPinMode(D3));\r\n    Serial.println(getPinMode(D4));\r\n    Serial.println(getPinMode(D5));\r\n    Serial.println(getPinMode(D6));\r\n    Serial.println(getPinMode(D7));\r\n    Serial.println(getPinMode(A0));\r\n}\r\n```\r\n\r\nOutput: \r\n```\r\n1\r\n0\r\n2\r\n3\r\n4\r\n5\r\n6\r\n7\r\n0\r\n```"}}