📄 as31glue.h
字号:
/* * MP3 Player, Main Program, http://www.pjrc.com/tech/mp3 * Copyright (c) 2000, PJRC.COM, LLC * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * As a specific exception to the GPL, the executable object code built * from this source code may be combined with hardware configuration data * files. A hardware configuration data file is a set of data that is * transmitted to an intergrated circuit that is not a general purpose * microprocessor or microcontroller, in order to establish its normal * operation. The process of combining the executable ojbect code built * from the GPL licensed source code with the hardware configuration data * shall be considered an aggregation of another work not based on the * Program. While the GPL does not restrict use of the program, any * use restriction associated with the hardware configuration data (for * example, that it only be used with particular hardware) shall apply * to the combined file which includes a copy of the hardware configuration * data. * * Contact: paul@pjrc.com */#ifndef SDCC_MODEL_LARGE#error "SDCC's large memory model is required"#endif#ifndef AS31GLUE_H#define AS31GLUE_H#include "parse.h"#include "params.h"bit at 0x1E mute_is_on;bit at 0x1F debug;struct dirent_struct { unsigned char attrib; char short_name[13]; unsigned long cluster; unsigned long size; char long_name[230];};/* there are certainly others that don't touch the registers *//* need to investigate which ones and define them here */#pragma CALLEE-SAVES get_root_1st_cluster,flushextern void init_uart(void);extern void timer_setup(void);extern void ide_hard_reset(void);extern char ide_init(void);extern void ide_flush(void);extern void do_ide_loop(unsigned char num);extern void ide_sleep(void);extern char is_ide_idle(void);extern char is_ide_sleeping(void);extern char init_memory_mgr(void);extern unsigned char detect_simm_size(void);extern void print_memory_available(void);extern void map_block(unsigned int block, xdata void *addr);extern unsigned int malloc_blocks(unsigned char num);extern void free_blocks(unsigned int block);extern unsigned int next_block(unsigned int block);extern char play_block(unsigned int block, unsigned int nbytes);extern unsigned char play_queue_avail(void);extern char is_play_queue_empty(void);extern void play_resume(void);extern void play_suspend(void);extern void play_abort(void);extern void play_dma_irq_enable(void);extern void set_timer(unsigned char timer, unsigned int value);extern unsigned int read_timer(unsigned char timer);extern void clear_timer(unsigned char timer);extern unsigned long clock_tick(void);extern char test_sta013(void);extern void fill_null_mp3(xdata void *addr, unsigned char num_frames);extern unsigned char sta013_get_attenuation(void);extern void sta013_set_attenuation(unsigned char);extern char sta013_init(void);extern char sta013_read(unsigned char addr, xdata unsigned char *value);extern char sta013_write(unsigned char addr, xdata unsigned char *value);extern unsigned long sta013_read_header(void);extern char detect_filesystem(void);extern unsigned long get_root_1st_cluster(void);extern char file_open_by_1st_cluster(unsigned long first_cluster);extern void file_cache(char fd, unsigned long offset, unsigned long length);extern char file_cache_work(char fd);extern char file_seek(char fd, unsigned long offset);extern unsigned long file_tell(char fd);extern unsigned char file_read(char fd, xdata void *buf, unsigned char count);extern unsigned int file_read_block(char fd);extern char dir_read_fast(char fd, xdata void *info);extern char dir_read_fast_name(xdata char * buf);extern void file_close(char fd);extern void file_uncache(char fd, unsigned long offset, unsigned long length);extern void free_fat_memory(void);extern void update_events(void);extern event_t get_next_event(void);extern void add_new_event(event_t event);extern void put_back_event(event_t event);extern char write_flash_param(param_t parm_id, idata void *data);extern unsigned char read_param_1byte(param_t parm_id, unsigned char default_value);extern char xilinx_download(void);extern void power_shutdown(void);extern void run_old_firmware(void);extern void drivers_init(void);extern void flush(void);extern char file_mem_map(char fd, char block_addr);#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -