libnds
Loading...
Searching...
No Matches
Macros | Functions
firmware.h File Reference

DS firmware flash ARM7 helpers. More...

#include <nds/ndstypes.h>
#include <nds/system.h>

Macros

#define FIRMWARE_DP   0xB9
 Deep Power Down.
 
#define FIRMWARE_FAST   0x0B
 Fast Read Data Bytes (preceded by a dummy byte)
 
#define FIRMWARE_PE   0xDB
 Page Erase.
 
#define FIRMWARE_PP   0x02
 Page Program.
 
#define FIRMWARE_PW   0x0A
 Page Write.
 
#define FIRMWARE_RDID   0x9F
 Read JEDEC ID.
 
#define FIRMWARE_RDP   0xAB
 Release from Deep Power Down.
 
#define FIRMWARE_RDSR   0x05
 Read Status Register.
 
#define FIRMWARE_READ   0x03
 Read Data Bytes.
 
#define FIRMWARE_SE   0xD8
 Sector Erase.
 
#define FIRMWARE_WRDI   0x04
 Write Disable.
 
#define FIRMWARE_WREN   0x06
 Write Enable.
 

Functions

int readFirmwareJEDEC (u8 *destination, u32 size)
 Read the JEDEC ID of the firmware flash.
 

Detailed Description

DS firmware flash ARM7 helpers.

Function Documentation

◆ readFirmwareJEDEC()

int readFirmwareJEDEC ( u8 destination,
u32  size 
)

Read the JEDEC ID of the firmware flash.

Parameters
destinationArray where the data read from the firmware will be stored.
sizeNumber of bytes to read from the firmware.
Returns
On success it returns 0. Otherwise, it returns a negative number.