Functions
PAC_Initialize
bool PAC_Initialize()

Initialize PAC module

Return

FALSE if not PAC compatible SRAM found

PAC_GetNumber
inline u8 PAC_GetNumber()

Get number of detected PAC devices.  PAC_Initialize must be called first.

Return

Number of detected PAC devices

PAC_GetSlot
inline u8 PAC_GetSlot(
u8 dev
)

Get a given PAC device's slot ID

Parameters
dev
u8

PAC device index

Return

Slot ID

PAC_GetDefaultSlot
inline u8 PAC_GetDefaultSlot()

Get the default (first) PAC device's slot ID

Return

Default device's slot ID

PAC_Select
inline void PAC_Select(
u8 dev
)

Select a given PAC device

Parameters
dev
u8

PAC device index

PAC_Activate
void PAC_Activate(
bool bEnable
)

Activate or disactive the current PAC device

Parameters
bEnable
bool

FALSE to disable

PAC_Write
void PAC_Write(
u8 page,
const u8* data,
u16 size
)

Write data to the current PAC device in the given page

Parameters
page
u8

PAC's page to write on (0-7)

data
const u8*

Pointer to data to write

size
u16

Size of data to write

PAC_Read
void PAC_Read(
u8 page,
u8* data,
u16 size
)

Read data from the current PAC device in the given page

Parameters
page
u8

PAC's page to read from (0-7)

data
u8*

Pointer to store read data

size
u16

Size of data to read

PAC_Format
void PAC_Format(
u8 page
)

Format the given page in the current PAC device

Parameters
page
u8

PAC's page to format (0-7)

PAC_FormatAll
inline void PAC_FormatAll()

Format all pages in the current PAC device

PAC_Check
u8 PAC_Check(
u8 page
)

Check the stat of the given page in the current PAC device

Parameters
page
u8

PAC's page to check (0-7)