////////////////////// Driver for Multimedia Card ///////////////////////
//// ////
//// mmc_init
() -
Reset and Initialize the MMC.
Returns zero
if OK ////
//// ////
//// mmc_modify_byte(address, val) - Modify the byte at address to ////
//// change it's value to val. Will read/write the ////
//// entire 512 byte block but only change this ////
//// specific byte. Returns zero if OK. ////
//// ////
//// mmc_modify_block
(address,
size, *ptr
) - Modifies the bytes ////
//// to change their value to whats stored at *ptr. ////
//// Will read/write the entire 512 byte block(s) but ////
//// only change the values defined by ptr and
size. ////
//// Returns zero if OK. ////
//// ////
//// mmc_write_block
(address,
size, *ptr
) - Writes a
512 byte ////
//// block to the MMC.
If size is less than
512 then ////
//// unspecified data will be written as 0. Returns ////
//// zero if OK. ////
//// ////
//// mmc_read_byte(address,*ptr) - Reads the byte specified at ////
//// address.
Result is saved to ptr.
Returns zero ////
//// if OK. ////
//// ////
//// mmc_read_block
(address,
size, *ptr
) - Reads the bytes ////
//// specified at address.
Result is saved to ptr. ////
//// Returns zero if OK. ////
//// NOTE: You might
get an address
error if you
try ////
//// to read over a page
size.
For example, trying ////
//// to read a block
size of
512 starting at address ////
//// 0x100 may cause an
error because you are reading ////
//// two blocks. ////
//// ////
//// mmc_erase(address, blocks) - Erases the block specified at ////
//// address. Will erase the entire 512 byte block. ////
////
If you wish to erase
more blocks after specified ////
//// block use the blocks parameter to specifiy how ////
//// many extra blocks to erase. Returns zero if OK. ////
//// ////
//// ~~~~~~~ MULTI-READ FUNCTIONS ~~~~~~~~ ////
//// ////
//// mmc_read_enable
(address,
size) - Start multi-reads at ////
//// specified address.
Size is the
size of each ////
//// individual read. Returns zero if OK. ////
//// ////
//// mmc_read_mult_block(*ptr) - Reads data from the MMC, and saves ////
//// to ptr.
The number of bytes read
is defined ////
//// by mmc_read_enable(). You must call ////
//// mmc_read_enable() before you can call this. ////
//// Returns zero if OK. ////
//// ////
//// mmc_read_disable(void) - Stop a multi-read. ////
//// Returns zero if OK. ////
//// MAY BE BROKEN. ////
//// ////
/////////////////////////////////////////////////////////////////////////