{"action":"closed","issue":{"url":"https://api.github.com/repos/apiriadmin/APIRI/issues/4","repository_url":"https://api.github.com/repos/apiriadmin/APIRI","labels_url":"https://api.github.com/repos/apiriadmin/APIRI/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/apiriadmin/APIRI/issues/4/comments","events_url":"https://api.github.com/repos/apiriadmin/APIRI/issues/4/events","html_url":"https://github.com/apiriadmin/APIRI/issues/4","id":63287786,"number":4,"title":"fpui_set_led() not implemented","user":{"login":"ckrinke","id":10451343,"avatar_url":"https://avatars.githubusercontent.com/u/10451343?v=3","gravatar_id":"","url":"https://api.github.com/users/ckrinke","html_url":"https://github.com/ckrinke","followers_url":"https://api.github.com/users/ckrinke/followers","following_url":"https://api.github.com/users/ckrinke/following{/other_user}","gists_url":"https://api.github.com/users/ckrinke/gists{/gist_id}","starred_url":"https://api.github.com/users/ckrinke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ckrinke/subscriptions","organizations_url":"https://api.github.com/users/ckrinke/orgs","repos_url":"https://api.github.com/users/ckrinke/repos","events_url":"https://api.github.com/users/ckrinke/events{/privacy}","received_events_url":"https://api.github.com/users/ckrinke/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-20T19:27:55Z","updated_at":"2016-03-21T22:17:32Z","closed_at":"2016-03-21T22:17:32Z","body":"Neither fpui_set_led() nor fpui_get_led() are implemented. here is a proposed implementation for both.\r\n/*\r\n\tLED Operators\r\n*/\r\nint fpui_set_led( int fd, int state )\r\n{\r\n  int ledfd;\r\n  char sbuf[16];  \r\n\r\n  if( (ledfd = open( \"/dev/cpuactive\", O_RDWR )) < 0 ) {\r\n    return( fd );\r\n  }\r\n\r\n  sprintf( sbuf, \"%d\", state );\r\n  write( ledfd, sbuf, sizeof( sbuf ) );\r\n  close (ledfd);\r\n  return( 0 );\r\n}\r\n\r\n\r\nint fpui_get_led( int fd )\r\n{\r\n  //The ATC specification specifies a write only cpuactive\r\n  //so we are returning an error for this function.\r\n  //Recommend this function be removed from the ATCAPI spec\r\n  return( -1 );\r\n}\r\n"}}