📄 mp3.h
字号:
/*************************************************************************
*
* Copyright 2004 National ASIC Center, All rights Reserved
*
* FILE NAME: mp3.h
* PROGRAMMER: zhangbing
* Date of Creation: 2004/09/17
*
* DESCRIPTION: This file is for mp3 application,mainly define macros used
* to locate all controllers according to the size of phycal
* screen,to determin the number of songs and the length of
* a song's name,functions declaration.
* NOTE:
*
**************************************************************************/
#ifndef _MP3_H
#define _MP3_H
//#include <stdlib.h>
//#include <stdio.h>
#include <asixdef.h>
/***For TagV1 of ID3***/
typedef struct mp3id3_tagv1 //TagV1的数据结构
{
char tag_id[3]; //tag标识符
char title[30]; //歌曲名
char artist[30]; //艺术家
char album[30]; //收藏夹(唱片)
char year[4]; //发行年份
char comment[30]; //备注
unsigned char genre; //风格流派
}ID3_TAGV1;
/***For TagV2 of ID3***/
typedef struct tagv2_head //TagV2头数据的数据结构
{
char tag_id[3]; //tag标识符
unsigned char tag_ver[2]; //tag版本号
unsigned char fags; //标志
unsigned char tagv2_size[4]; //TagV2的帧数据大小
}TAGV2_HEAD;
typedef struct tagv2_frame_head //TagV2帧数据的head部分数据结构
{
char frame_id[4]; //帧标识符
unsigned char body_size[4]; //body部分大小
unsigned char falg[2]; //存储标志
}TAGV2_FRAME_HEAD;
typedef struct mp3id3_tagv2 //TagV2的数据结构
{
TAGV2_HEAD tagv2_hd;
TAGV2_FRAME_HEAD frame_hd;
}ID3_TAGV2;
/******FOR MP3 NAME******/
#define MP3_NUM 40 //歌曲的数目
#define MP3_NAME_LEN 40 //歌曲名的长度(字符)
/******FOR 160*240 SCREEN******/
#if(LCD_WIDTH==160)
#define PLAWIN_WIDTH 160 //背景窗口宽度
#define PLAWIN_HEIGH 200 //背景窗口高度
#define BUTS_X_POS 8 //控制按扭水平坐标
#define BUTS_Y_POS 65 //控制按扭垂直坐标
#define DISP_NUM 5 //列表栏显示数目
#define LIST_X_POS 13 //第一个列表按扭水平坐标
#define LIST_Y_POS 112 //第一个列表按扭垂直坐标
#define LIST_WIDTH 117 //列表按扭宽度
#define SCRL_X_POS 131 //滚动条水平坐标
#define SCRL_Y_POS 112 //滚动条垂直坐标
#define SCRL_HEIGH 100 //滚动条高度
/******FOR 240*320 SCREEN******/
#else//#if(LCD_WIDTH==160)
#define PLAWIN_WIDTH 240 //背景窗口宽度
#define PLAWIN_HEIGH 280 //背景窗口高度
#define INF_X_POS 8 //信息窗口水平坐标
#define INF_Y_POS 40 //信息窗口垂直坐标
#define SUBV_X_POS 172 //音量减小按扭水平坐标
#define SUBV_Y_POS 65 //音量减小按扭垂直坐标
#define ADDV_X_POS 212 //音量增加按扭水平坐标
#define ADDV_Y_POS 65 //音量增加按扭垂直坐标
#define BUTS_X_POS 10 //控制按扭水平坐标
#define BUTS_Y_POS 65 //控制按扭垂直坐标
#define BUTS_LEN 32 //控制按扭水平宽度
#define BUTS_HIG 22 //控制按扭垂直高度
#define SELE_X_POS 10 //选择按钮水平坐标
#define SELE_Y_POS 90 //选择按钮垂直坐标
#define SELE_WIDTH 55 //选择按钮水平宽度
#define SELE_HEIGH 18 //选择按钮垂直高度
#define DISP_NUM 7 //列表栏显示数目
#define LIST_X_POS 18 //第一个列表按扭水平坐标
#define LIST_Y_POS 149 //第一个列表按扭垂直坐标
#define LIST_WIDTH 188 //列表按扭宽度
#define SCRL_X_POS 207 //滚动条水平坐标
#define SCRL_Y_POS 149 //滚动条垂直坐标
#define SCRL_HEIGH 140 //滚动条高度
#endif//#if(LCD_WIDTH==160)
/******for mp3 icon******/
extern const unsigned char add_volum[];
extern const unsigned char sub_volum[];
extern const unsigned char mp3_start[];
extern const unsigned char mp3_stop[];
extern const unsigned char mp3_pause[];
extern const unsigned char mp3_playwin[];
extern const unsigned char mp3_prev[];
extern const unsigned char mp3_next[];
/******for mp3 name******/
extern char * mp3_name;
extern STATUS Refreshtime(char * timestr); //时间字符串格式为HH:MM:SS
extern STATUS Rrfreshname(char * mp3name);
#endif//#ifndef _MP3_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -