📄 avr-eeprom.h
字号:
// This file is part of MANTIS OS, Operating System// See http://mantis.cs.colorado.edu///// Copyright (C) 2003,2004,2005 University of Colorado, Boulder//// This program is free software; you can redistribute it and/or// modify it under the terms of the mos license (see file LICENSE)/*the basic on and off functions are available to external users, but the recommended use is through the dev_write call*//** @file avr-eeprom.h * @brief EEPROM driver for both the onboard 4k. * @author Jeff Rose * @author Modified: Adam Torgerson * @date Created: 02/17/2003 * @date Modified: 04/06/2004 */#ifndef _AVR_EEPROM_H#define _AVR_EEPROM_H/* The following EEPROM areas are used by various components of MOS: * * 0x000 to 0x00B Boot control block (see boot.h) * 0x00C to 0x01F Deluge control block (see deluge.c) * 0x020 to 0x07F Deluge page CRC's (see deluge.c) * 0x080 to 0x0B3 Metadata for simple file system (see simple_fs.c) * 0x0B4 to 0xFFF Unused space */#define DELUGE_INSTANCE_COUNT (4)#define DELUGE_CONTROL_BLOCK_ADDR (0x00C) /* Right after the boot CB */#define DELUGE_CONTROL_BLOCK_SIZE (16)#define DELUGE_DIRECTORY_ADDR (DELUGE_CONTROL_BLOCK_ADDR + \ DELUGE_INSTANCE_COUNT * \ DELUGE_CONTROL_BLOCK_SIZE)#define DELUGE_DIRECTORY_SIZE (1)#define DELUGE_PAGE_CRC_ADDR (DELUGE_DIRECTORY_ADDR + \ DELUGE_INSTANCE_COUNT * \ DELUGE_DIRECTORY_SIZE)#define SIMPLE_FS_ADDR (DELUGE_PAGE_CRC_ADDR + 96)#define SIMPLE_FS_MAX_FILES 10#define SIMPLE_FS_SIZE (2 + SIMPLE_FS_MAX_FILES * 12)#define DELUGE_STATS_ADDR (SIMPLE_FS_ADDR + SIMPLE_FS_SIZE)#define DELUGE_STATS_COUNT 32#define DELUGE_STATS_SIZE 8 // 4 16-bit fields#define AVR_EEPROM_UNUSED_ADDR (DELUGE_STATS_ADDR + \ DELUGE_STATS_COUNT * \ DELUGE_STATS_SIZE)/** @brief Init the eeprom driver */void avr_eeprom_init(void);#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -