mirror of
https://github.com/apache/nuttx.git
synced 2026-08-15 09:23:20 +00:00
rpmsg_port_spi: add log to know spi complete callback not called
1. add error log when transferring keeps rasing because of no spi exchange complete callback; 2. this log can also be used to check if there is an interrupt has been caught when peer side keeps trying to send data; Signed-off-by: liaoao <liaoao@xiaomi.com>
This commit is contained in:
parent
880160bfca
commit
39ff211469
1 changed files with 8 additions and 1 deletions
|
|
@ -195,10 +195,17 @@ static void rpmsg_port_spi_register_cb(FAR struct rpmsg_port_s *port,
|
|||
static void rpmsg_port_spi_exchange(FAR struct rpmsg_port_spi_s *rpspi)
|
||||
{
|
||||
FAR struct rpmsg_port_header_s *txhdr;
|
||||
int pending;
|
||||
|
||||
IOEXP_WRITEPIN(rpspi->ioe, rpspi->mreq, 0);
|
||||
if (atomic_fetch_add(&rpspi->transferring, 1))
|
||||
pending = atomic_fetch_add(&rpspi->transferring, 1);
|
||||
if (pending > 0)
|
||||
{
|
||||
if (pending > 1)
|
||||
{
|
||||
rpmsgerr("pending too many requests: %d\n", pending);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue