📄 frankmp3.h
字号:
/******************************************************************************
Title: Frank's MP3 project header file
Author: Frank Van Hooft
Date: 16 December 2001
This file contains definitions required for the MP3 player project.
It should be #include'd into both the assembly and C source files.
Note that only definitions which are required by both assembler & C
files are in this file. Definitions required only by assembler are
in the assembler files. Definitions required only by C are kept
in the fvhmp3c.h file.
******************************************************************************/
/* The following used by the queueing routines */
#define Q_OK 0 /* function executed without error */
#define Q_empty 1 /* queue was empty */
#define Q_full 2 /* queue was full */
#define Q_notempty 3 /* queue is not empty */
/* The following defines the size of the MP3 data queue (including q header) */
/* Take care making this larger - check the .map file. And you need */
/* to allow a little space for the stack (which sits at the top of memory). */
#define MP3DATAQ_size 3600
#define __stack 0x10ff /* tell C compiler where top of memory & stack is */
/* The following defines the size of the filename string array. It's defined as multiples of long- */
/* filename directory entries. Each directory entry contains 13 characters. */
#define FindFile_NumLongDirs 8 /* number of 13-char long name entries to allocate space for */
/* The following are used by the FindFile or FindFileC routines */
#define FindFile_MP3 1 /* find an MP3 file (filetype) */
#define FindFile_first 2 /* find first file in directory (command) */
#define FindFile_next 3 /* find next file in directory (command) */
#define FindFile_busy 4 /* FindFile state machine still working (return value) */
#define FindFile_err 5 /* unknown/unspported command or file type (return value) */
#define FindFile_nomor 6 /* no more files (end of dir for next; start of dir for first) (return value) */
#define FindFile_done 7 /* requested file found; FindFile is finished (return value) */
#define FindFile_St_Idle 8 /* Idle state */
#define FindFile_St_ParseDir 9 /* Parse Directory state */
#define FindFile_St_NxtClus 10 /* Next Cluster state */
#define FindFile_DirEnd 11 /* return value: unexpected end of directory */
/* Following used by PlayControl (PC) */
#define PC_Cmd_Play 0 /* Play command */
#define PC_Cmd_Stop 1 /* Stop command */
#define PC_Cmd_Next 2 /* Next file command */
#define PC_Cmd_Prev 3 /* Previous file command */
#define PC_Cmd_Idle 4 /* Idle - do nothing, change nothing */
#define PC_Cmd_Pause 5 /* Pause - hold, do exactly nothing while this command active */
#define PC_Cmd_Add10 6 /* Step forward 10 songs */
#define PC_Cmd_Add100 7 /* Step forward 100 songs */
#define PC_Cmd_Bak10 8 /* Step backwards 10 songs */
#define PC_Cmd_Bak100 9 /* Step backwards 100 songs */
/* Following used by StreamFile */
#define StreamFile_St_Idle 0 /* Idle state */
#define StreamFile_St_SeekClus 1 /* SeekCluster state */
#define StreamFile_St_SeekClus2 2 /* SeekCluster2 state */
#define StreamFile_St_ReadData 3 /* ReadData state */
#define StreamFile_St_WaitDrv 4 /* WaitDriveNotBusy state */
#define StreamFile_St_LearnClus 5 /* LearnNextCluster state */
#define StreamFile_Cmd_Stop 0 /* Stop command */
#define StreamFile_Cmd_Stream 1 /* Stream command */
#define StreamFile_Cmd_SmWithCl 2 /* Stream command, with cluster numbers inserted in data */
/* This constant used by the StreamFile routine */
#define StreamFile_MaxBytes 100 /* Max # bytes to stream per execution. Must be even. */
/* Following used by FeedSTcodec routine */
#define FSC_Cmd_Stop 0 /* stop command */
#define FSC_Cmd_Play 1 /* play command */
/* AVR internal IO Registers */
#define UBRR 0x09 /* uart 0 baud rate register */
#define USR 0x0b /* uart 0 status register */
#define UDR 0x0c /* uart 0 data register */
#define UCR 0x0a /* uart 0 control register */
#define U1BRR 0x99 /* uart 1 baud rate register */
#define U1SR 0x9b /* uart 1 status register */
#define U1DR 0x9c /* uart 1 data register */
#define U1CR 0x9a /* uart 1 control register */
/* AVR internal registers Bit Definitions - UCSR - UART Control & status Register */
#define TXEN 3 /* transmitter enable */
#define RXEN 4 /* receiver enable */
#define UDRE 5 /* tx data register empty interrupt enable */
#define RXCIE 7 /* rx complete interrupt enable (data received interrupt) */
/* Constants used by the SeekSector routine in file ide.s */
#define SeekSect_ISS 0 /* InitSeek state */
#define SeekSect_WSS 1 /* WaitSeek state */
#define SeekSect_Busy 2 /* return code: routine is still busy */
#define SeekSect_Done 3 /* return code: routine is done; seek complete */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -