KallistiOS  2.0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Functions
vmu.h File Reference

Definitions for using the VMU device. More...

#include <sys/cdefs.h>
#include <arch/types.h>
#include <dc/maple.h>

Go to the source code of this file.

Functions

int vmu_beep_raw (maple_device_t *dev, uint32 beep)
 Make a VMU beep.
int vmu_draw_lcd (maple_device_t *dev, void *bitmap)
 Display a 1bpp bitmap on a VMU screen.
int vmu_block_read (maple_device_t *dev, uint16 blocknum, uint8 *buffer)
 Read a block from a memory card.
int vmu_block_write (maple_device_t *dev, uint16 blocknum, uint8 *buffer)
 Write a block to a memory card.
void vmu_set_icon (const char *vmu_icon)
 Set a Xwindows XBM on all VMUs.

Detailed Description

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.

Author:
Jordan DeLong
Dan Potter
Donald Haase

Function Documentation

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.

Parameters:
devThe device to attempt to beep.
beepThe tone to generate. Actual parameters unknown.
Return values:
MAPLE_EOKOn success.
MAPLE_EAGAINIf the command couldn't be sent. Try again later.
MAPLE_ETIMEOUTIf 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.

Parameters:
devThe device to read from.
blocknumThe block number to read.
bufferThe buffer to read into (512 bytes).
Return values:
MAPLE_EOKOn success.
MAPLE_ETIMEOUTIf the command timed out while blocking.
MAPLE_EFAILOn 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.

Parameters:
devThe device to write to.
blocknumThe block number to write.
bufferThe buffer to write from (512 bytes).
Return values:
MAPLE_EOKOn success.
MAPLE_ETIMEOUTIf the command timed out while blocking.
MAPLE_EFAILOn 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.

Parameters:
devThe device to draw to.
bitmapThe bitmap to show.
Return values:
MAPLE_EOKOn success.
MAPLE_EAGAINIf the command couldn't be sent. Try again later.
MAPLE_ETIMEOUTIf 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.

Parameters:
vmu_iconThe icon to set.