亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? player.c

?? MP3 Player Source Code
?? C
?? 第 1 頁 / 共 2 頁
字號:
/**\file player.c * VLSI Modular Player Main file * * * This file contains the main() function. * It's also the main playground for player UI development. * Many functions will be transferred to a new module when they're ok. *//** \mainpage *  * This is a preliminary version of the new MP3 player  * evaluation kit source code. Some bugs still exist. *  * This is pure C code. No inline assembly. * It compiles with SDCC 2.4.0. Upload with Atmel Flip. * Connect a terminal with settings 115200bps,N81 to the * serial port to see the console output. * * The code is written for VLSI Evakit 1.5-1.6 that has VS1011/1002 * and AT89C51RD2 microcontroller.  * Now also Evakit 2.0-2.5 with VS1011, VS1002 or VS1003 is supported.  * It should be easily portable * for other microcontrollers.  * * All microcontroller/pcb -specific definitions should * be in board.h and board.c but some board specific * features may still lurk in the code elsewhere.  * Due to SDCC requirements, interrupts are defined in player.c (main file). * They are of course board/cpu dependent. * * Throughout the code, SDCC memory allocation pragmas "code" "data" and "xdata" * are used, sorry. "Code" allocates from ROM, "data" allocates from fast RAM, * "xdata" allocates from slow RAM. You may need to remove/adjust these to make * code compatible with your compiler. * * It is strongly suggested that you use the free SDCC 2.4.0 to compile the * code. SDCC 2.5.0 fails to compile the code: Although it has advantages * over v2.4, it tries to allocate more extra temporary memory than is * available if you compile all the modules (incl. recording). * * <B>How to get started</b> * * - Look at "File list" to see what kind of modules are in the project. * - Look at vs10xx.c and vs10xx.h file documentations to see how the * vs10xx is reset and how to send MP3 data to it (PlayDiskSectors()). * - Function AvailableProcessorTime() handles the user interface. It is * called by PlayDiskSectors() whenever the player seems to have some free * time. Additionally, a timer interrupt routine sets the  * <b>userInterfaceDelayElapsed</b> flag every 50ms or so. To avoid unnecessary * CPU load, AvailableProcessorTime() * checks this flag and updates display etc only when this flag is set. * - The user interface commands the player routine by setting a special * state variable <b>playingState</b>. For instance if the user pushes a "Next Song" * button, the ui should set <b>playingState</b> to <i>PS_NEXT_SONG</i>.  * PlayDiskSectors() detects this, stops playing and returns to caller. * - Much of the main functionality is still in player.c and main(). Much * of it will be transferred to a new file ui.c at some time. * * The description of how the program works and the module structure will be * written here soon. Please check http://www.vlsi.fi/ * often to see if the final code is released. Email to * mp3@vlsi.fi about bugs. * * <b>Changes in version 0.5:</b> * * Filesystem and Storage are affected. Code has been added to handle new * MMC cards with manufacturer id 21 and possibly others that seem to * (sometimes) require resetting CRC calculation before they agree to work. * Storage.c is divided into submodules storage.c and mmc.c and a new  * file buffer.c is created to hold the global I/O buffer. This clarifies * the code a lot. Lots of documentation is added to MMC and filing system * functions, do yourself a favor and read it through. * * In storage.c, mmc.c and filesys.c a "dummy" declarator Public is added * in declarations for functions that are called from outside the module * and thus form module interface. It has no code effect in C but is a * reminder for the programmer that the functions need to be adjusted * carefully. * * Storage.c is now a "middle-level" disk handler that takes advantage of * lower level functions in mmc.c. It handles decisions of when to seek * based on testing whether the underlying storage module supports  * separate seeks before reads. A new function PrepareToReadDiskSector() is * for telling the storage that it can do a seek now if the storage * supports it. * * Adding support for different storage media that MMC is easy: only mmc.c * needs to be rewritten. Currently it only has 3 public functions: * Init, Seek sector and Read sector. As the code uses ONLY the address * granularity of 512 bytes, called a "disk sector", supporting hard * disks etc should be very simple. * * * <b>Support for compiling under Windows:</b> * * The code is natively developed under Linux and Makefile for GNU Make is * included. Now also .bat files for compiling in Dos window under Win32 * are included, plus a readme.txt file. Use them at your own risk :) * * <B>Changes in version 0.6</b> * * The major improvement is adding recording support. Recording for  * VS1003 is supported. See the Record() function documentation for  * instructions. The Record() function can only create a single file * fragment. If a fragment boundary is reached, recording continues * to a new file. * Also there is an experimental function PlayAVI() in * module aviplay.c that often succeeds in demuxing an avifile and * sending just the audio stream for decoding. * * Much of the FAT code is rewritten for speedups. * * \todo VFAT long file names, *  * \remarks If you are usind SDCC 2.4.0 and you need just a little bit * of more DSEG memory (now how on Earth that might happen...) you * can hand-allocate global variables to unused addresses 0x08..0x1F, * for instance: declaring * <pre> * data at 0x08 unsigned int myVariable; * </pre> * would place myVariable in DSEG addresses 0x08..0x09. * * Note for HyperTerminal users: Check the "Append Line Feeds" checkbox  * in terminal settings -> ascii setup. * * Example output to console: When the code runs it prints out something like: * (from a little older version) * <pre> * * Board: Console is up. * Init: Board; supports: AT89C51RD2, MMC, VS10xx, RS232 *  * VLSI Modular Player * Starting up. *  * Init: Filesystem; supports: MBR, FAT16, FAT32 * Trying to bring up storage... * Init: Storage v2: supports: MMC,SD,miniSD in SPI mode * Init: MMC * Card found, starting... Ok. *  * MMC Manufacturer#: 30 Product Name: MMC    Production date: 10 / 2004 * Media serial number: 00000468 * This MMC has no support for interrupted read. Using compatibility mode. * Storage initialized in seek-and-read mode. * Storage ok. * Sector 0 read...ok. * Sector signature...ok. * Partition 1... at sector 00000020 * Formatter signature: %j!BFIHC * Bytes per sector:    512 * Bytes per sector:    512 * Reserved sectors:    1 * Number of FATs:      2 * Root entries:        512 * Total Sectors 16:    0 * Fat Size 16:         123 * Hidden Sectors:      32 * Total Sectors 32:    125408 * File system is FAT16 * File system signature is FAT16 * Volume Label is NO NAME * Sectors per Cluster: 4 * FAT Start sector:    33 * Root start sector:   279 * Data start sector:   303 *  * Init: VS10XX * Loading patch. *  * Filesystem: Looking for file 1 ... found, FAT name is "UTOPIA~1MP3" * File size: 1471792 bytes. Start cluster: 0003h, sector 315 decimal. * Building file fragment table... * Fragment Start: 315  Fragment End: 3190  Fragment length: 2876 *  * Fragments: 1 * Player: Playing from sector 315 * * </pre> * ...and so on. * */#include "board.h"#include "lcd.h"#include "filesys.h"#include "vs10xx.h"#include "storage.h"#include "display.h"#include "string.h"#include "ui.h"#include "mmc.h"#include "record.h"/**  typedef for loading patch code */#define u_int8 code unsigned char /**  typedef for loading patch code */#define u_int16 code unsigned int //include a patch code module#ifdef VS1003#include "spec_rew.c"#else#include "loud_sa.c"#endif/** How much to wait for button pressed before returning to title */#define UI_RETURN_DELAY 150/** Playing State Global */xdata playingstatetype playingState = PS_NORMAL;/** Current interrupt level */unsigned char intlevel = 0;/** Interrupt-driven flag to reduce unnecessary UI updates. * This is set to 1 by timer interrupt every n milliseconds. */xdata unsigned char userInterfaceDelayElapsed = 0;/** Current User Interface mode (Title, Volume, ...) */xdata uimodetype uiMode = UI_SPEC;xdata unsigned char SPMax=0;/** User Interface Timer interrupt. * Does NOT do any screen/button handling, only updates * screen scroll variable and the  * userInterfaceDelayElapsed flag. */void timer0_interrupt(void) interrupt 1{  static char displayDelay;  userInterfaceDelayElapsed = 1;  if (++displayDelay==12){    displayDelay = 0;    displayPosition++;    if (displayPosition>displayLength+7){      displayPosition = -7;    }  }  if (SP>SPMax) SPMax = SP;  }/** Load a patch code to VS10xx */void LoadPatch(){  ConsoleWrite ("Loading patch.\r");  for (temp.i=0; temp.i < CODELEN; temp.i++) {        Mp3WriteRegister(atab[temp.i], dtab[temp.i]>>8, dtab[temp.i]&0xff);   }  Delay(10);}/** Start patch code */void StartPatch(){#ifdef VS1003  //  Mp3WriteRegister(SPI_AIADDR, 0x00, 0x50);            #else  //Mp3WriteRegister(SPI_AIADDR, 0x02, 0x00);              //Mp3WriteRegister(SPI_AICTRL0, 0x00, 0x00);  //Mp3WriteRegister(SPI_AICTRL0, 0x00, 0x01);#endif}/** Sets playing time and mode icon to left display title */void ScreenSetPlayTime(){  unsigned int playTime;  unsigned char minutes, seconds;  playTime = Mp3ReadRegister(SPI_DECODE_TIME);  minutes = playTime/60;  seconds = playTime%60;  displayTitle[0]=('0'+minutes/10);  displayTitle[1]=('0'+minutes%10);  displayTitle[2]=(':');  displayTitle[3]=('0'+seconds/10);  displayTitle[4]=('0'+seconds%10);  displayTitle[5]=(' ');  displayTitle[6]=(' ');  displayTitle[7]=(' ');    if (seconds&1){    if (playingState == PS_RECORDING){      displayTitle[6]='o';    }else{      displayTitle[6]='\x7e';    }  }  if ((playingState != PS_NORMAL)&&(playingState != PS_RECORDING)){    displayTitle[6]='\xdb';  }    }/** This function is called when the player is playing a song and there is free processor time. The basic task of this function is to implement the player user interface. */void AvailableProcessorTime(){  /** Local variables: */  /** - <b>volume</b>: Current volume setting */  static xdata unsigned char volume = 20;  /** - <b>bass</b>: Current bass enhancer setting */  static xdata unsigned char bass = 0;  /** - <b>treble</b>: Current treble enhancer setting */  static xdata unsigned char treble = 64; //middle setting = 0  /** - <b>reclevel</b>: Current recording level setting */  static xdata unsigned char reclevel = 50;  unsigned int i; //temp variable  static bit bassUpdateNeeded;  /** - <b>uiReturnDelay</b>: Counts down to returning to UI mode      0 (title screen) */  static unsigned char uiReturnDelay=0;  if (!userInterfaceDelayElapsed){    return; /* Not yet time to do user interface stuff */  }    userInterfaceDelayElapsed = 0;  // User Interface Modes  // Return to UI_TITLE after long period of button inactivity  if (uiReturnDelay == 0){    if ((uiMode != UI_SPEC)&&(uiMode != UI_CUE))      uiMode = UI_TITLE;    else{    }  }else{    uiReturnDelay--;  }  #ifndef VS1003  if (uiMode==UI_SPEC) //Only VS1003 has spectrum analyzer    uiMode++;  if (uiMode==UI_RECLEVEL) //Only record in VS1003 chips    uiMode++;#endif  if (uiMode==UI_INFO)    uiMode++; //Nothing interesting currently in screen UI_INFO.  if (uiMode==UI_STOP)    uiMode++; //Nothing interesting currently in screen UI_STOP.  /* Screen updates */  switch(uiMode){      case UI_TITLE:  //Playing time, song title    displayStyle = DS_TEXT;    ScreenSetPlayTime();        if (playingState==PS_RECORDING){            displayStyle = DS_PERCENTAGE;    }             break;      case UI_STOP: //Ask if the user wants to stop    displayStyle = DS_NO_YES;    strcpy (displayTitle, "Stop?   ");    break;  case UI_CUE: //Ask if the user wants to fast forward or rewind    displayStyle = DS_RAWTEXT;    strcpy (displayTitle, "REW/CUE  <-   ->");    //i = Mp3ReadRegister(SPI_HDAT1);    //displayTitle[5] = lcd_hexchars[i>>12];    //displayTitle[6] = lcd_hexchars[(i>>8)&0x0f];    //displayTitle[7] = lcd_hexchars[(i>>4)&0x0f];    //displayTitle[8] = lcd_hexchars[i&0x0f];    break;      case UI_VOLUME: //Show volume bar    LcdSelectFont(lcdFont_barchars);    displayStyle = DS_PERCENTAGE;    strcpy(displayTitle,"Volume: ");    displayValue = (100-(volume>>1));    if (displayValue<0) displayValue = 0;    break;  case UI_BASS: //Show bass bar    LcdSelectFont(lcdFont_barchars);    displayStyle = DS_PERCENTAGE;    strcpy(displayTitle,"Bass:   ");    displayValue = (bass/5)*4;    if (displayValue<1) displayValue = 1;    break;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲视频小说图片| 奇米色777欧美一区二区| 亚洲成a人片在线不卡一二三区| 丝袜美腿亚洲色图| www.欧美.com| 91精品国产一区二区三区| 国产精品视频第一区| 日韩av电影天堂| 色哟哟日韩精品| 欧美激情在线一区二区| 久久99在线观看| 欧美性高清videossexo| 中文字幕亚洲精品在线观看| 精品一区二区成人精品| 欧美男男青年gay1069videost| 欧美国产97人人爽人人喊| 久久精品国产成人一区二区三区| 91精品福利在线| 国产精品久久久久久久久免费丝袜 | 欧美日韩国产小视频在线观看| 久久网这里都是精品| 麻豆视频观看网址久久| 欧美亚洲综合网| 一区二区三区在线免费| aaa亚洲精品一二三区| 久久精品一区二区| 国产在线视视频有精品| 日韩亚洲欧美高清| 日韩av电影一区| 日韩三区在线观看| 美女网站在线免费欧美精品| 91精品国产福利在线观看| 日韩专区中文字幕一区二区| 欧美日本精品一区二区三区| 午夜精品aaa| 欧美区在线观看| 日本视频中文字幕一区二区三区| 欧美男生操女生| 精彩视频一区二区三区| 26uuuu精品一区二区| 国产成人在线观看免费网站| 国产日产精品一区| 成人精品国产一区二区4080| 国产精品二区一区二区aⅴ污介绍| 99在线精品视频| 亚洲综合一区二区精品导航| 在线观看成人免费视频| 日韩在线一二三区| 欧美成人r级一区二区三区| 国产在线播放一区二区三区| 日本一区二区三区免费乱视频| 成人精品国产一区二区4080| 亚洲天天做日日做天天谢日日欢| 91在线国内视频| 日韩电影在线免费看| 久久午夜电影网| 91女厕偷拍女厕偷拍高清| 亚洲一区二区在线播放相泽| 精品女同一区二区| 97国产精品videossex| 亚洲成av人片在线| www欧美成人18+| 色婷婷激情综合| 精品一区二区三区在线播放 | 亚洲三级电影全部在线观看高清| 在线影院国内精品| 久久99精品国产| 亚洲色图欧美激情| 精品国产一区二区三区久久久蜜月| 国产精品69久久久久水密桃| 亚洲综合色在线| 欧美国产97人人爽人人喊| 欧美日韩高清在线| 成人福利电影精品一区二区在线观看| 伊人一区二区三区| 久久久777精品电影网影网 | 26uuu精品一区二区三区四区在线| 成人免费黄色大片| 蜜桃av噜噜一区| 亚洲一区二区在线视频| 久久综合色之久久综合| 欧美日韩在线一区二区| 国产精品亚洲一区二区三区在线| 一区二区国产视频| 国产网站一区二区| 欧美日韩国产一区| 99精品国产视频| 国产精品一色哟哟哟| 亚洲国产wwwccc36天堂| 国产精品嫩草影院av蜜臀| 日韩欧美视频一区| 欧美色图12p| 91免费在线播放| 国产精品一区二区视频| 日韩av在线发布| 无码av免费一区二区三区试看| 中文一区二区在线观看| 日韩欧美另类在线| 欧美猛男男办公室激情| 色噜噜偷拍精品综合在线| 成人精品gif动图一区| 国产一区视频在线看| 日韩国产欧美在线播放| 亚洲a一区二区| 亚洲成人一区在线| 亚洲国产成人porn| 亚洲狠狠爱一区二区三区| 亚洲精品乱码久久久久久| 中文字幕日韩av资源站| 国产精品美女一区二区三区| 久久日一线二线三线suv| 日韩欧美国产一区二区三区| 欧美一级日韩一级| 欧美一级夜夜爽| 精品毛片乱码1区2区3区| 精品国产一二三| 久久新电视剧免费观看| 2021久久国产精品不只是精品| 欧美mv日韩mv国产网站| 久久久不卡网国产精品二区| 久久久久久久久久美女| 国产三级欧美三级| 国产精品久久久久久久浪潮网站| 国产精品美女视频| 亚洲最色的网站| 日韩精品久久久久久| 蜜臀av在线播放一区二区三区 | 欧美一区午夜视频在线观看| 欧美精品电影在线播放| 日韩视频一区在线观看| 精品日产卡一卡二卡麻豆| 欧美国产亚洲另类动漫| 国产精品美女久久久久aⅴ| 亚洲精品国产一区二区三区四区在线| 亚洲色图在线看| 免费日韩伦理电影| 国产乱对白刺激视频不卡| 夫妻av一区二区| 在线一区二区视频| 精品久久久久一区二区国产| 欧美激情一区二区三区全黄| 亚洲最大成人综合| 久国产精品韩国三级视频| 丰满放荡岳乱妇91ww| 色综合久久九月婷婷色综合| 91精品久久久久久久99蜜桃 | 国产69精品久久777的优势| 波多野结衣在线aⅴ中文字幕不卡| 色综合久久天天| 精品国产91乱码一区二区三区| 亚洲国产高清aⅴ视频| 亚洲第一会所有码转帖| 久久97超碰国产精品超碰| 色综合网色综合| 精品国偷自产国产一区| 亚洲图片你懂的| 激情五月激情综合网| 色婷婷久久久久swag精品| 久久一留热品黄| 亚洲第一综合色| 9人人澡人人爽人人精品| 欧美三级中文字幕| 国产精品无人区| 蜜桃久久久久久久| 欧美曰成人黄网| 国产精品素人一区二区| 激情综合一区二区三区| 欧美制服丝袜第一页| 国产日产亚洲精品系列| 日韩av网站在线观看| 99精品视频一区| 欧美经典一区二区| 麻豆精品视频在线| 欧美色倩网站大全免费| 日韩美女视频一区二区| 国产自产v一区二区三区c| 欧美日韩一级黄| 一色桃子久久精品亚洲| 国产一区二区不卡| 日韩欧美一区中文| 偷拍自拍另类欧美| 欧美在线一二三四区| 中文字幕一区av| 成人动漫中文字幕| 中文在线资源观看网站视频免费不卡| 蜜臀av一区二区在线免费观看 | 天天色天天爱天天射综合| 91蝌蚪porny| 中文字幕亚洲欧美在线不卡| 成人天堂资源www在线| 国产亚洲午夜高清国产拍精品| 亚洲电影在线播放| 欧美系列在线观看| 一个色妞综合视频在线观看| www.在线欧美| 亚洲婷婷综合久久一本伊一区| av电影在线观看不卡| 一区视频在线播放| 99久久精品免费看| 亚洲码国产岛国毛片在线|