KallistiOS
##version##
|
Definitions for using the VMU device. More...
Go to the source code of this file.
Functions | |
int | vmu_beep_raw (maple_device_t *dev, uint32 beep) |
Make a VMU beep. More... | |
int | vmu_draw_lcd (maple_device_t *dev, void *bitmap) |
Display a 1bpp bitmap on a VMU screen. More... | |
int | vmu_block_read (maple_device_t *dev, uint16 blocknum, uint8 *buffer) |
Read a block from a memory card. More... | |
int | vmu_block_write (maple_device_t *dev, uint16 blocknum, uint8 *buffer) |
Write a block to a memory card. More... | |
void | vmu_set_icon (const char *vmu_icon) |
Set a Xwindows XBM on all VMUs. More... | |
Definitions for using the VMU device.
This file contains the definitions needed to access the Maple VMU device. This includes all of the functionality of memory cards, including the MAPLE_FUNC_MEMCARD, MAPLE_FUNC_LCD, and MAPLE_FUNC_CLOCK function codes.
int vmu_beep_raw | ( | maple_device_t * | dev, |
uint32 | beep | ||
) |
Make a VMU beep.
This function sends a raw beep to a VMU, causing the speaker to emit a tone noise. See http://dcemulation.org/phpBB/viewtopic.php?f=29&t=97048 for the original information about beeping.
dev | The device to attempt to beep. |
beep | The tone to generate. Actual parameters unknown. |
MAPLE_EOK | On success. |
MAPLE_EAGAIN | If the command couldn't be sent. Try again later. |
MAPLE_ETIMEOUT | If the command timed out while blocking. |
int vmu_block_read | ( | maple_device_t * | dev, |
uint16 | blocknum, | ||
uint8 * | buffer | ||
) |
Read a block from a memory card.
This function reads a raw block from a memory card. You most likely will not ever use this directly, but rather will probably use the fs_vmu stuff.
dev | The device to read from. |
blocknum | The block number to read. |
buffer | The buffer to read into (512 bytes). |
MAPLE_EOK | On success. |
MAPLE_ETIMEOUT | If the command timed out while blocking. |
MAPLE_EFAIL | On errors other than timeout. |
int vmu_block_write | ( | maple_device_t * | dev, |
uint16 | blocknum, | ||
uint8 * | buffer | ||
) |
Write a block to a memory card.
This function writes a raw block to a memory card. You most likely will not ever use this directly, but rather will probably use the fs_vmu stuff.
dev | The device to write to. |
blocknum | The block number to write. |
buffer | The buffer to write from (512 bytes). |
MAPLE_EOK | On success. |
MAPLE_ETIMEOUT | If the command timed out while blocking. |
MAPLE_EFAIL | On errors other than timeout. |
int vmu_draw_lcd | ( | maple_device_t * | dev, |
void * | bitmap | ||
) |
Display a 1bpp bitmap on a VMU screen.
This function sends a raw bitmap to a VMU to display on its screen. This bitmap is 1bpp, and is 48x32 in size.
dev | The device to draw to. |
bitmap | The bitmap to show. |
MAPLE_EOK | On success. |
MAPLE_EAGAIN | If the command couldn't be sent. Try again later. |
MAPLE_ETIMEOUT | If the command timed out while blocking. |
void vmu_set_icon | ( | const char * | vmu_icon | ) |
Set a Xwindows XBM on all VMUs.
This function takes in a Xwindows XBM and sets the image on all VMUs. This is a convenience function for vmu_draw_lcd() to broadcast across all VMUs.
vmu_icon | The icon to set. |