/* Check the amount of space left in the hardware FIFO. 
This function reads the IOSLAVE FIFOPTR register and determines the amount of space left in the IOS LRAM FIFO. */
static uint32_t fifo_space_left(void)
/* Check the amount of space left in the hardware FIFO. 
This function reads the IOSLAVE FIFOPTR register and determines the amount of space left in the IOS LRAM FIFO. */
static uint32_t fifo_space_left(void)
{
    return ((uint32_t)g_ui32HwFifoSize- AM_BFR(IOSLAVE, FIFOPTR, FIFOSIZ) - 1);
}