flashchips.h
来自「Linux下操作Bios的驱动」· C头文件 代码 · 共 59 行
H
59 行
/* * BIOS/Flashrom driver for Linux * * Copyright (C) 1998-2002 Stefan Reinauer <stepan@suse.de> * *//* * flags structure * bit 0 = needs erase before write (f_needs_erase) * bit 1-3 flash manu type * bit 4-6 probably needed for more manu * bit 7 = sector erase happens one sector at a time * (f_slow_sector_erase) */#define f_needs_erase 0x01/* 3 bit for flashtype */#define f_manuf_compl 0x0e /* Mask out bits 1-3 */#define f_intel_compl 0x02 /* 001 */#define f_atmel_compl 0x04 /* 010 */#define f_fwh_compl 0x08 /* 100 */#define f_slow_sector_erase 0x80struct flashdevice { unsigned char *mapped; unsigned char *physical; unsigned long offset; unsigned int flashnum, manufnum; unsigned short id; unsigned int size, sectors; int (*activate)(int cmd, void *data); void *data; int open_mode, open_cnt;};struct flashchip { char *name; unsigned short id; unsigned int voltage; unsigned int size; /* KBytes */ unsigned int supported; unsigned int pagesize; /* Bytes */ unsigned int flags; unsigned int *sectors; /* Kbytes[] including end of last sector */};struct manufacturer { char *name; unsigned short id;};extern struct flashdevice flashdevices[BIOS_MAXDEV];extern const struct flashchip flashchips[];extern const struct manufacturer manufacturers[];
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?