/* This routine performs a byte swap on a 32-bit word */
uint32_t swap32(uint32_t data)
/* This routine performs a byte swap on a 32-bit word */
uint32_t swap32(uint32_t data)
{
    uint32_t temp = 0;
    temp = (data & 0xff) << 24;
    temp |= ((data & 0xff00) << 8);
    temp |= ((data & 0xff0000) >> 8);
    temp |= ((data & 0xff000000) >> 24);
    return (temp);
}