{"action":"created","issue":{"url":"https://api.github.com/repos/espruino/Espruino/issues/833","repository_url":"https://api.github.com/repos/espruino/Espruino","labels_url":"https://api.github.com/repos/espruino/Espruino/issues/833/labels{/name}","comments_url":"https://api.github.com/repos/espruino/Espruino/issues/833/comments","events_url":"https://api.github.com/repos/espruino/Espruino/issues/833/events","html_url":"https://github.com/espruino/Espruino/issues/833","id":145715283,"number":833,"title":"pinMode() not stored in flash on NUCLEO-F411RE?","user":{"login":"yerpj","id":11556895,"avatar_url":"https://avatars.githubusercontent.com/u/11556895?v=3","gravatar_id":"","url":"https://api.github.com/users/yerpj","html_url":"https://github.com/yerpj","followers_url":"https://api.github.com/users/yerpj/followers","following_url":"https://api.github.com/users/yerpj/following{/other_user}","gists_url":"https://api.github.com/users/yerpj/gists{/gist_id}","starred_url":"https://api.github.com/users/yerpj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yerpj/subscriptions","organizations_url":"https://api.github.com/users/yerpj/orgs","repos_url":"https://api.github.com/users/yerpj/repos","events_url":"https://api.github.com/users/yerpj/events{/privacy}","received_events_url":"https://api.github.com/users/yerpj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2016-04-04T15:19:01Z","updated_at":"2016-04-05T08:18:36Z","closed_at":null,"body":"Hello,\r\n\r\nWorking on NUCLEO-F411RE, I tried to save() some code into flash, including this line:\r\n`pinMode(C7,'output');`\r\n\r\nThen, dumping the code with dump() indicates me that the line of code magically transformed to `digitalWrite(C7,1);` \r\n\r\nThen I tried to save only this pinMode() instruction into flash. after another dump(), the only line remaining in flash is also `digitalWrite(C7,1);`\r\n\r\nThis NUCLEO is running the 1v85 from the official archive."},"comment":{"url":"https://api.github.com/repos/espruino/Espruino/issues/comments/205716431","html_url":"https://github.com/espruino/Espruino/issues/833#issuecomment-205716431","issue_url":"https://api.github.com/repos/espruino/Espruino/issues/833","id":205716431,"user":{"login":"yerpj","id":11556895,"avatar_url":"https://avatars.githubusercontent.com/u/11556895?v=3","gravatar_id":"","url":"https://api.github.com/users/yerpj","html_url":"https://github.com/yerpj","followers_url":"https://api.github.com/users/yerpj/followers","following_url":"https://api.github.com/users/yerpj/following{/other_user}","gists_url":"https://api.github.com/users/yerpj/gists{/gist_id}","starred_url":"https://api.github.com/users/yerpj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yerpj/subscriptions","organizations_url":"https://api.github.com/users/yerpj/orgs","repos_url":"https://api.github.com/users/yerpj/repos","events_url":"https://api.github.com/users/yerpj/events{/privacy}","received_events_url":"https://api.github.com/users/yerpj/received_events","type":"User","site_admin":false},"created_at":"2016-04-05T08:18:36Z","updated_at":"2016-04-05T08:18:36Z","body":"I do not completely agree with this philosophy. In my point of view, when a user [even a beginner] calls `digitalWrite()` prior to `digitalRead()`, he clearly wants to set a logical level on the corresponding output pin, then he wants to read it back. Then if he really wants to change the pin behaviour, he will have to call explicitely `pinMode()` before reading the pin . \r\nAnyway, as said before, if you are comfortable with the current behaviour, I suggest that things remains as is. "}}