All pastes #382340 Raw Edit

Untitled

public text v1 · immutable
·published 2007-03-05 15:16 UTC
rendered paste body
//get coin entry
unsigned char USBIO::get_entry(unsigned char *data)
{       
    unsigned char string[80];
    string[0]='@';string[1]=0;string[2]=CMD_ENTRY;string[3]='*';
    usbio.WriteBuffer(string,4);

    Uint32 time=SDL_GetTicks()+1000;
    do
    {
        unsigned char reply=comms_recieve(data);
        if (reply==CMD_ENTRY)
            return(1);
        else if (reply)
            printf("Get_Entry, recieved WRONG %d\n",reply);
    }while(time>SDL_GetTicks());
    return(0);    
}