libsavgba
A library to access various backup media in GBA cartridges
Functions
gba_sram.h File Reference

Go to the source code of this file.

Functions

int sram_read (u32 addr, u8 *data, size_t size)
 Read data from SRAM. More...
 
int sram_write (u32 addr, u8 *data, size_t size)
 Write data to SRAM. More...
 

Function Documentation

◆ sram_read()

int sram_read ( u32  addr,
u8 *  data,
size_t  size 
)

Read data from SRAM.

Parameters
addraddress in SRAM (unit: byte).
databuffer to hold data.
sizedata size (unit: byte).
Returns
0 for success, non-zero for error.

◆ sram_write()

int sram_write ( u32  addr,
u8 *  data,
size_t  size 
)

Write data to SRAM.

Parameters
addraddress in SRAM (unit: byte).
databuffer to hold data.
sizedata size (unit: byte).
Returns
0 for success, non-zero for error.