27#ifndef __DC_MAPLE_VMU_H
28#define __DC_MAPLE_VMU_H
238#define VMU_SCREEN_WIDTH 48
244#define VMU_SCREEN_HEIGHT 32
542#define VMU_DPAD_UP BIT(0)
543#define VMU_DPAD_DOWN BIT(1)
544#define VMU_DPAD_LEFT BIT(2)
545#define VMU_DPAD_RIGHT BIT(3)
548#define VMU_MODE BIT(6)
549#define VMU_SLEEP BIT(7)
561typedef union vmu_buttons {
581typedef struct vmu_state {
635void vmu_shutdown(
void);
int vmu_get_datetime(maple_device_t *dev, time_t *unix)
Get the date and time on the VMU.
int vmu_beep_raw(maple_device_t *dev, uint32_t beep)
Make a VMU beep (low-level).
int vmu_get_buttons_enabled(void)
Check whether polling for VMU input has been enabled.
int vmu_set_datetime(maple_device_t *dev, time_t unix)
Set the date and time on the VMU.
int vmu_beep_waveform(maple_device_t *dev, uint8_t period1, uint8_t duty_cycle1, uint8_t period2, uint8_t duty_cycle2)
Play VMU Buzzer tone.
void vmu_set_buttons_enabled(int enable)
Enable/Disable polling for VMU input.
int vmu_draw_lcd_rotated(maple_device_t *dev, const void *bitmap)
Display a 1bpp bitmap on a VMU screen.
int vmu_draw_lcd(maple_device_t *dev, const void *bitmap)
Display a 1bpp bitmap on a VMU screen.
int vmu_draw_lcd_xbm(maple_device_t *dev, const char *vmu_icon)
Display a Xwindows XBM image on a VMU screen.
void vmu_set_icon(const char *vmu_icon)
Display a Xwindows XBM on all VMUs.
int vmu_block_write(maple_device_t *dev, uint16_t blocknum, const uint8_t *buffer)
Write a block to a memory card.
int vmu_block_read(maple_device_t *dev, uint16_t blocknum, uint8_t *buffer)
Read a block from a memory card.
int vmu_use_custom_color(maple_device_t *dev, int enable)
Enable custom color of a VMU.
int vmu_set_custom_color(maple_device_t *dev, uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha)
Set custom color of a VMU.
int vmu_set_icon_shape(maple_device_t *dev, uint8_t icon_shape)
Set icon shape of a VMU.
int vmu_toggle_241_blocks(maple_device_t *dev, int enable)
Enable the extra 41 blocks of a VMU.
int vmu_has_241_blocks(maple_device_t *dev)
Get the status of a VMUs extra 41 blocks.
int vmu_get_custom_color(maple_device_t *dev, uint8_t *red, uint8_t *green, uint8_t *blue, uint8_t *alpha)
Get custom color of a VMU.
int vmu_get_icon_shape(maple_device_t *dev, uint8_t *icon_shape)
Get icon shape of a VMU.
Maple Bus driver interface.
Macros to help dealing with register fields.
One maple device.
Definition maple.h:271
"Civilized" structure containing VMU's current state.
Definition vmu.h:581
vmu_buttons_t previous
Button states from the previous frame.
Definition vmu.h:584
vmu_buttons_t current
Button states from the current frame.
Definition vmu.h:583
KOS-implementation of select C11 and POSIX extensions.