{"action":"opened","issue":{"url":"https://api.github.com/repos/mon80/hello-world2/issues/1","repository_url":"https://api.github.com/repos/mon80/hello-world2","labels_url":"https://api.github.com/repos/mon80/hello-world2/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/mon80/hello-world2/issues/1/comments","events_url":"https://api.github.com/repos/mon80/hello-world2/issues/1/events","html_url":"https://github.com/mon80/hello-world2/issues/1","id":183457541,"number":1,"title":"test","user":{"login":"mon80","id":22886334,"avatar_url":"https://avatars.githubusercontent.com/u/22886334?v=3","gravatar_id":"","url":"https://api.github.com/users/mon80","html_url":"https://github.com/mon80","followers_url":"https://api.github.com/users/mon80/followers","following_url":"https://api.github.com/users/mon80/following{/other_user}","gists_url":"https://api.github.com/users/mon80/gists{/gist_id}","starred_url":"https://api.github.com/users/mon80/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mon80/subscriptions","organizations_url":"https://api.github.com/users/mon80/orgs","repos_url":"https://api.github.com/users/mon80/repos","events_url":"https://api.github.com/users/mon80/events{/privacy}","received_events_url":"https://api.github.com/users/mon80/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-17T16:02:07Z","updated_at":"2016-10-17T16:02:07Z","closed_at":null,"body":"I am facing following error while using FT232RL under Windows environment.\r\n\r\n>rl78flash -m 2 -b 250000 -iav COM14 cotton_sketch.mot\r\nFAILED\r\nSynchronization failed\r\n\r\nI have debugged this problem for a while and I get an idea to fix this problem.\r\n\r\nfile: serial_win32.c\r\n\r\nport_handle_t serial_open(const char *port)\r\n{\r\n    port_handle_t fd;\r\n    char port_full_name[20];\r\n    snprintf(port_full_name, sizeof port_full_name - 2u,\r\n             \"\\\\\\\\.\\\\%s\", port);\r\n    if (4 <= verbose_level)\r\n    {\r\n        printf(\"\\t\\tOpen port: %s\\n\", port_full_name);\r\n    }\r\n    fd = CreateFile(port_full_name,\r\n                    GENERIC_READ | GENERIC_WRITE,\r\n                    0,\r\n                    NULL,\r\n                    OPEN_EXISTING,\r\n                    FILE_ATTRIBUTE_NORMAL,\r\n                    0);\r\n    if (INVALID_HANDLE_VALUE == fd)\r\n    {\r\n        int error_num = GetLastError();\r\n        char error_string[1024];\r\n        FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,\r\n                      NULL,\r\n                      error_num,\r\n                      MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),\r\n                      error_string,\r\n                      sizeof error_string,\r\n                      NULL);\r\n        fprintf(stderr, \"Unable to open port: (%i) %s\\n\", error_num, error_string);\r\n    }\r\n    else\r\n    {\r\n        DCB dcbSerialParams;\r\n        GetCommState(fd, &dcbSerialParams);\r\n        dcbSerialParams.BaudRate = CBR_115200;\r\n        dcbSerialParams.ByteSize = 8;\r\n        dcbSerialParams.StopBits = TWOSTOPBITS;\r\n        dcbSerialParams.Parity = NOPARITY;\r\n        dcbSerialParams.fDtrControl = DTR_CONTROL_DISABLE;\r\n        dcbSerialParams.fRtsControl = RTS_CONTROL_DISABLE;\r\n        SetCommState(fd, &dcbSerialParams);\r\n\r\n        COMMTIMEOUTS timeouts;\r\n        timeouts.ReadIntervalTimeout=50;\r\n        timeouts.ReadTotalTimeoutConstant=50;\r\n        timeouts.ReadTotalTimeoutMultiplier=10;\r\n        timeouts.WriteTotalTimeoutConstant=0;\r\n        timeouts.WriteTotalTimeoutMultiplier=0;\r\n        SetCommTimeouts(fd, &timeouts);\r\n        FlushFileBuffers(fd);\r\n    }\r\n    return fd;\r\n}\r\n\r\n"}}
{"actor":{"display_login":"mon80"}}