cc6e6871a2ab705cf9784aa581d4fc10dae9014a
[goodfet] / firmware / lib / command.c
1 //! Different command handling functions.
2
3 unsigned char cmddata[256];
4
5 //! Transmit data.
6 void txdata(unsigned char app,
7             unsigned char verb,
8             unsigned char len){
9   unsigned int i=0;
10   serial_tx(app);
11   serial_tx(verb);
12   serial_tx(len);
13   for(i=0;i<len;i++){
14     serial_tx(cmddata[i]);
15   }
16 }
17
18 //! Delay for a count.
19 void delay(unsigned int count){
20   volatile unsigned int i=count;
21   while(i--) asm("nop");
22 }