KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
flash.h
Go to the documentation of this file.
1/* KallistiOS ##version##
2
3 navi/flash.h
4 Copyright (C) 2002 Megan Potter
5
6*/
7
8/** \file navi/flash.h
9 \brief BIOS replacement flashrom support.
10
11 This file is involved with accessing an flashrom chip soldered in place to
12 replace the BIOS ROM. Specifically, this driver is for accessing a STMicro
13 M29W800B, but should also work with other chips like the M29W160B or
14 equivalent AMD chips.
15
16 \author Megan Potter
17*/
18
19#ifndef __NAVI_FLASH_H
20#define __NAVI_FLASH_H
21
22#include <arch/types.h>
23
24/** \brief Try to detect a compatible flashrom.
25 \return 0 if a compatible flashrom is detected, <0 if the
26 normal Dreamcast BIOS is detected.
27*/
29
30/** \brief Erase a single block of flashrom.
31 \param addr The block of the flashrom to erase.
32 \return 0 on success, <0 on error.
33*/
35
36/** \brief Write data to the flashrom.
37 \param addr The block of the flashrom to write to.
38 \param data The data to write.
39 \param len The length of the data, in bytes.
40 \return 0 on success, <0 on error.
41*/
42int nvflash_write_block(uint32 addr, void * data, uint32 len);
43
44/* Erase the whole flash chip */
45/** \brief Erase the whole flashrom.
46 \return 0 on success, <0 on error.
47*/
49
50#endif /* __NAVI_FLASH_H */
int nvflash_write_block(uint32 addr, void *data, uint32 len)
Write data to the flashrom.
int nvflash_erase_block(uint32 addr)
Erase a single block of flashrom.
int nvflash_erase_all(void)
Erase the whole flashrom.
int nvflash_detect(void)
Try to detect a compatible flashrom.
unsigned long uint32
32-bit unsigned integer
Definition types.h:33
Common integer types.