Functions

mempak.c File Reference

Mempak Filesystem Routine. More...

#include <string.h>
#include "libdragon.h"
#include "regsinternal.h"

Defines

Inode values

#define BLOCK_EMPTY   0x03
 This block is empty.
#define BLOCK_LAST   0x01
 This is the last block in the note.
#define BLOCK_VALID_FIRST   0x05
 First valid block that can contain user data.
#define BLOCK_VALID_LAST   0x7F
 Last valid block that can contain user data.

Functions

int read_mempak_sector (int controller, int sector, uint8_t *sector_data)
 Read a sector from a mempak.
int write_mempak_sector (int controller, int sector, uint8_t *sector_data)
 Write a sector to a mempak.
int validate_mempak (int controller)
 Return whether a mempak is valid.
int get_mempak_entry (int controller, int entry, entry_structure_t *entry_data)
 Read an entry on a mempak.
int get_mempak_free_space (int controller)
 Return the number of free blocks on a mempak.
int format_mempak (int controller)
 Format a mempak.
int read_mempak_entry_data (int controller, entry_structure_t *entry, uint8_t *data)
 Read the data associated with an entry on a mempak.
int write_mempak_entry_data (int controller, entry_structure_t *entry, uint8_t *data)
 Write associated data to a mempak entry.
int delete_mempak_entry (int controller, entry_structure_t *entry)
 Delete a mempak entry and associated data.

Detailed Description

Mempak Filesystem Routine.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines