#include extern int sio_send_frame(/*const*/ unsigned char *buf, int size); extern int sio_recv_frame(unsigned char* buf, int size); extern void sio_init(void); int MikeMain(void *argument) { static char msg0[] = "Type 0x"; static char msg1[] = "0123456789abcdef"; static char msg2[] = " character(s)\n"; static char msg3[] = "\n"; static char buf[16]; int n; sio_init(); while (1) { n = (buf[0] % 10) + 1; sio_send_frame(msg0, sizeof(msg0) - 1); sio_send_frame(&msg1[n], 1); sio_send_frame(msg2, sizeof(msg2) - 1); n = sio_recv_frame(buf, n); sio_send_frame(msg3, sizeof(msg3) - 1); sio_send_frame(buf, n); sio_send_frame(msg3, sizeof(msg3) - 1); } return 0; }