Use the right variable name at mcp2515_txready()
This commit is contained in:
parent
e4d98a5c0e
commit
fb7866bdc8
@ -1823,7 +1823,7 @@ static bool mcp2515_txready(FAR struct can_dev_s *dev)
|
|||||||
{
|
{
|
||||||
FAR struct mcp2515_can_s *priv;
|
FAR struct mcp2515_can_s *priv;
|
||||||
uint8_t regval;
|
uint8_t regval;
|
||||||
bool empty;
|
bool ready;
|
||||||
|
|
||||||
DEBUGASSERT(dev);
|
DEBUGASSERT(dev);
|
||||||
priv = dev->cd_priv;
|
priv = dev->cd_priv;
|
||||||
@ -1845,32 +1845,32 @@ static bool mcp2515_txready(FAR struct can_dev_s *dev)
|
|||||||
mcp2515_readregs(priv, MCP2515_TXB0CTRL, ®val, 1);
|
mcp2515_readregs(priv, MCP2515_TXB0CTRL, ®val, 1);
|
||||||
if ((regval & TXBCTRL_TXREQ) == 0)
|
if ((regval & TXBCTRL_TXREQ) == 0)
|
||||||
{
|
{
|
||||||
empty = true;
|
ready = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mcp2515_readregs(priv, MCP2515_TXB1CTRL, ®val, 1);
|
mcp2515_readregs(priv, MCP2515_TXB1CTRL, ®val, 1);
|
||||||
if ((regval & TXBCTRL_TXREQ) == 0)
|
if ((regval & TXBCTRL_TXREQ) == 0)
|
||||||
{
|
{
|
||||||
empty = true;
|
ready = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mcp2515_readregs(priv, MCP2515_TXB2CTRL, ®val, 1);
|
mcp2515_readregs(priv, MCP2515_TXB2CTRL, ®val, 1);
|
||||||
if ((regval & TXBCTRL_TXREQ) == 0)
|
if ((regval & TXBCTRL_TXREQ) == 0)
|
||||||
{
|
{
|
||||||
empty = true;
|
ready = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
empty = false;
|
ready = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mcp2515_dev_unlock(priv);
|
mcp2515_dev_unlock(priv);
|
||||||
|
|
||||||
return empty;
|
return ready;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
Loading…
Reference in New Issue
Block a user