Specifications

Appendices
Appendix A – The Player Source code
/*
* MP3 player with network interface.
* The Ethernut code
* Engineering Thesis 2002
* by Michael Somersmith
*/
/* The MAC address of the realtek controler - dont loose */
#define MY_MAC {0x00,0x06,0x98,0x01,0x00,0x61}
/* Buffer size all buffer management is based around this */
#define BUFFER_SIZE 16000
#include <dev/irqreg.h>
#include <string.h>
#include <dev/nicrtl.h>
#include <sys/heap.h>
#include <sys/thread.h>
#include <sys/timer.h>
#include <sys/print.h>
#include <netinet/sostream.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include "vs1001k.c"
#define NO_COL (16) // number of columns on the LCD
#define lcddelay (5) //delay for data settling on LCD
void initialise_lcd(void);
void gotoxy(unsigned char x, unsigned char y);
void putch(char data);
void control(unsigned char data);
void print(char *text);
void clrscn(void);
void print_screen(char *text);
void printInt(unsigned int data, char length);
void printIntxy(unsigned char x, unsigned char y, unsigned int value, char digits);
void printxy(unsigned char x, unsigned char y, char *text);
#include "lcd.c"
static u_char mac[] = MY_MAC;
TCPSOCKET *command_sock;
TCPSOCKET *playlist_sock;
char play = 0;
char pause = 1;
u_char discard = 0;
static HANDLE q_pause = 0;
72