/* Checks whether the descriptor is empty. If the buffer1 and buffer2 lengths are zero in ring mode descriptor is empty. In chain mode buffer2 length is 0 but buffer2 itself contains the next descriptor address.  */
bool synopGMAC_is_desc_empty(DmaDesc *desc)
/* Checks whether the descriptor is empty. If the buffer1 and buffer2 lengths are zero in ring mode descriptor is empty. In chain mode buffer2 length is 0 but buffer2 itself contains the next descriptor address.  */
bool synopGMAC_is_desc_empty(DmaDesc *desc)
{
    return (((desc->length  & DescSize1Mask) == 0) && ((desc->length  & DescSize2Mask) == 0));
}