{"action":"opened","issue":{"url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/11455","repository_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr","labels_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/11455/labels{/name}","comments_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/11455/comments","events_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/11455/events","html_url":"https://github.com/zephyrproject-rtos/zephyr/issues/11455","id":381854778,"node_id":"MDU6SXNzdWUzODE4NTQ3Nzg=","number":11455,"title":"cdc_acm uart_fifo_fill sample app doesn't comply with the documentation","user":{"login":"kulve","id":1206669,"node_id":"MDQ6VXNlcjEyMDY2Njk=","avatar_url":"https://avatars3.githubusercontent.com/u/1206669?v=4","gravatar_id":"","url":"https://api.github.com/users/kulve","html_url":"https://github.com/kulve","followers_url":"https://api.github.com/users/kulve/followers","following_url":"https://api.github.com/users/kulve/following{/other_user}","gists_url":"https://api.github.com/users/kulve/gists{/gist_id}","starred_url":"https://api.github.com/users/kulve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kulve/subscriptions","organizations_url":"https://api.github.com/users/kulve/orgs","repos_url":"https://api.github.com/users/kulve/repos","events_url":"https://api.github.com/users/kulve/events{/privacy}","received_events_url":"https://api.github.com/users/kulve/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-17T11:34:26Z","updated_at":"2018-11-17T11:34:26Z","closed_at":null,"author_association":"NONE","body":"The documentation in\r\nhttps://github.com/zephyrproject-rtos/zephyr/blob/master/include/uart.h#L378\r\n\r\nsays:\r\n\r\n_This function is expected to be called from UART interrupt handler (ISR), if uart_irq_tx_ready() returns true. Result of calling this function not from an ISR is undefined (hardware-dependent). Likewise, *not* calling this function from an ISR if uart_irq_tx_ready() returns true may lead to undefined behavior, e.g. infinite interrupt loops._\r\n\r\nYet the USB CDC ACM sample app doesn't do this:\r\n\r\nhttps://github.com/zephyrproject-rtos/zephyr/blob/master/samples/subsys/usb/cdc_acm/src/main.c#L50\r\n\r\nAssuming the documentation is correct, writing non-compliant sample apps confuses beginners and lead to bad code.\r\n\r\nSame applies to uart_fifo_read.\r\n\r\nPlease correct the sample app."}}
{"actor":{"display_login":"kulve"}}