{"action":"created","issue":{"url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/2599","repository_url":"https://api.github.com/repos/ARMmbed/mbed-os","labels_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/2599/labels{/name}","comments_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/2599/comments","events_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/2599/events","html_url":"https://github.com/ARMmbed/mbed-os/issues/2599","id":174460281,"number":2599,"title":"Question about SPI ASYNCH transfer API (documentation need?)","user":{"login":"LMESTM","id":17590297,"avatar_url":"https://avatars.githubusercontent.com/u/17590297?v=3","gravatar_id":"","url":"https://api.github.com/users/LMESTM","html_url":"https://github.com/LMESTM","followers_url":"https://api.github.com/users/LMESTM/followers","following_url":"https://api.github.com/users/LMESTM/following{/other_user}","gists_url":"https://api.github.com/users/LMESTM/gists{/gist_id}","starred_url":"https://api.github.com/users/LMESTM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LMESTM/subscriptions","organizations_url":"https://api.github.com/users/LMESTM/orgs","repos_url":"https://api.github.com/users/LMESTM/repos","events_url":"https://api.github.com/users/LMESTM/events{/privacy}","received_events_url":"https://api.github.com/users/LMESTM/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-09-01T08:00:53Z","updated_at":"2016-09-12T10:13:58Z","closed_at":null,"body":"Hello\r\n\r\nI've started to deliver STM32 support for SPI ASYNCH. While doing  this, I discussed with colleagues and this triggered a question on the trasnfer asynch API (documented here and header file) https://developer.mbed.org/users/mbed_official/code/mbed/docs/6c34061e7c34/group__AsynchSPI.html\r\n\r\nThe SPI transfer API is very similar to I2C one. \r\nIn I2C, even if this is not clearly documented (AFAIK), the transfer consist in sending a Tx command (with Tx_lenght) and then reading the Rx response from slave (with Rx_lenght that might be different from Tx_lenght). Very useful for using many I2C devices indeed. \r\nNote that this could help new comers to explicitely explain that Tx happens first, then Rx happens.\r\n\r\nNow coming to my SPI question: do we expect a similar steps approach as in I2C, that is, sending a command, then reading the corresponding response. That could make it easy to use some SPI devices ... or do we consider that because SPI is full duplex (Rx and Tx can happen at the same time) so transfer of Tx and Rx shall happen simultenaously. This takes benefit of the full duplex link, but this is not clear to us which SPI devices would benefit of such interface. For full duplex communication, one could easily consider that having the same Rx and Tx lenght makes things simpler (and allow full usage of the bandwidth). \r\n\r\nThanks in advance for clarifiying this point,\r\nBr\r\nLaurent"},"comment":{"url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/comments/246305599","html_url":"https://github.com/ARMmbed/mbed-os/issues/2599#issuecomment-246305599","issue_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/2599","id":246305599,"user":{"login":"LMESTM","id":17590297,"avatar_url":"https://avatars.githubusercontent.com/u/17590297?v=3","gravatar_id":"","url":"https://api.github.com/users/LMESTM","html_url":"https://github.com/LMESTM","followers_url":"https://api.github.com/users/LMESTM/followers","following_url":"https://api.github.com/users/LMESTM/following{/other_user}","gists_url":"https://api.github.com/users/LMESTM/gists{/gist_id}","starred_url":"https://api.github.com/users/LMESTM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LMESTM/subscriptions","organizations_url":"https://api.github.com/users/LMESTM/orgs","repos_url":"https://api.github.com/users/LMESTM/repos","events_url":"https://api.github.com/users/LMESTM/events{/privacy}","received_events_url":"https://api.github.com/users/LMESTM/received_events","type":"User","site_admin":false},"created_at":"2016-09-12T10:13:58Z","updated_at":"2016-09-12T10:13:58Z","body":"@0xc0170 : the doc here https://developer.mbed.org/users/mbed_official/code/mbed/docs/6c34061e7c34/group__AsynchSPI.html says : \r\n\r\n> Begin the SPI transfer.\r\n\r\nThis needs to be clarified to specify whether Rx and Tx will happen at the same time or if Rx happens first and then Tx will go on in a second step. Once decided, we can  conclude on how to actually send a PR for updating the description (and maybe APIs)\r\n\r\nthere is also a note below which seems outdated I think as we now have a pointer and a length as paramters\r\n> Buffer pointers and lengths are specified in tx_buff and rx_buff\r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"LMESTM"}}