TM4C Ethernet: Add some assertions

This commit is contained in:
Gregory Nutt 2015-01-16 15:25:18 -06:00
parent 02c4eafb45
commit 1be7285567

View File

@ -1660,6 +1660,13 @@ static void tiva_receive(FAR struct tiva_ethmac_s *priv)
{
struct net_driver_s *dev = &priv->dev;
/* I have seen this error just after writing a new image to FLASH. After
* resetting he board, I never see it again. I am guessing that the
* flasher leaves the hardware in a bad state(?).
*/
DEBUGASSERT(dev->d_buf != NULL);
/* Loop while while tiva_recvframe() successfully retrieves valid
* Ethernet frames.
*/
@ -2043,6 +2050,8 @@ static void tiva_interrupt_work(FAR void *arg)
{
FAR struct tiva_ethmac_s *priv = (FAR struct tiva_ethmac_s *)arg;
DEBUGASSERT(priv);
/* Process pending Ethernet interrupts */
tiva_interrupt_process(priv);