26#ifndef __DC_MAPLE_VMU_H
27#define __DC_MAPLE_VMU_H
236#define VMU_SCREEN_WIDTH 48
242#define VMU_SCREEN_HEIGHT 32
540#define VMU_DPAD_UP (0<<1)
541#define VMU_DPAD_DOWN (1<<1)
542#define VMU_DPAD_LEFT (2<<1)
543#define VMU_DPAD_RIGHT (3<<1)
546#define VMU_MODE (6<<1)
547#define VMU_SLEEP (7<<1)
550typedef struct vmu_cond {
561typedef union vmu_state {
622void 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.
One maple device.
Definition maple.h:270
VMU's raw condition data: 0 = PRESSED, 1 = RELEASED.
Definition vmu.h:550
uint8_t raw_buttons
Combined button mask.
Definition vmu.h:551
KOS-implementation of select C11 and POSIX extensions.
VMU's "civilized" state data: 0 = RELEASED, 1 = PRESSED.
Definition vmu.h:561
uint8_t mode
Mode button state.
Definition vmu.h:570
uint8_t dpad_up
Dpad Up button state.
Definition vmu.h:564
uint8_t dpad_left
Dpad Left button state.
Definition vmu.h:566
uint8_t sleep
Sleep button state.
Definition vmu.h:571
uint8_t dpad_down
Dpad Down button state.
Definition vmu.h:565
uint8_t a
'A' button state
Definition vmu.h:568
uint8_t dpad_right
Dpad Right button state.
Definition vmu.h:567
uint8_t buttons
Combined button state mask.
Definition vmu.h:562
uint8_t b
'B' button state
Definition vmu.h:569