KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
Rumble Pack

Maple driver for vibration pack peripherals More...

Files

file  purupuru.h
 Definitions for using the Puru Puru (Jump) Pack.
 

Data Structures

union  purupuru_effect_t
 Effect generation structure. More...
 

Functions

static uint32_t PURUPURU_EFFECT2_UINTENSITY (uint8_t x)
 
static uint32_t PURUPURU_EFFECT2_LINTENSITY (uint8_t x)
 
static uint32_t PURUPURU_EFFECT1_INTENSITY (uint8_t x)
 
int purupuru_rumble (maple_device_t *dev, const purupuru_effect_t *effect)
 Send an effect to a jump pack.
 
int purupuru_rumble_raw (maple_device_t *dev, uint32_t effect)
 Send a raw effect to a jump pack.
 

Variables

static const uint8_t PURUPURU_EFFECT2_DECAY = (8 << 4)
 
static const uint8_t PURUPURU_EFFECT2_PULSE = (8)
 
static const uint8_t PURUPURU_EFFECT1_PULSE = (8 << 4)
 
static const uint8_t PURUPURU_EFFECT1_POWERSAVE = (15)
 
static const uint8_t PURUPURU_SPECIAL_MOTOR1 = (1 << 4)
 
static const uint8_t PURUPURU_SPECIAL_MOTOR2 = (1 << 7)
 
static const uint8_t PURUPURU_SPECIAL_PULSE = (1)
 

Detailed Description

Maple driver for vibration pack peripherals

Function Documentation

◆ PURUPURU_EFFECT1_INTENSITY()

static uint32_t PURUPURU_EFFECT1_INTENSITY ( uint8_t x)
inlinestatic

References x.

◆ PURUPURU_EFFECT2_LINTENSITY()

static uint32_t PURUPURU_EFFECT2_LINTENSITY ( uint8_t x)
inlinestatic

References x.

◆ PURUPURU_EFFECT2_UINTENSITY()

static uint32_t PURUPURU_EFFECT2_UINTENSITY ( uint8_t x)
inlinestatic

References x.

◆ purupuru_rumble()

int purupuru_rumble ( maple_device_t * dev,
const purupuru_effect_t * effect )

Send an effect to a jump pack.

This function sends an effect created with the purupuru_effect_t structure to a jump pack to be executed.

Parameters
devThe device to send the command to.
effectThe effect to send.
Return values
MAPLE_EOKOn success.
MAPLE_EAGAINIf the command couldn't be sent. Try again later.
MAPLE_EINVALIDThe command is not being sent due to invalid input.

Referenced by main().

◆ purupuru_rumble_raw()

int purupuru_rumble_raw ( maple_device_t * dev,
uint32_t effect )

Send a raw effect to a jump pack.

This function sends an effect to a jump pack to be executed. This is for if you want to bypass KOS-based error checking. This is not recommended except for testing purposes.

Parameters
devThe device to send the command to.
effectThe effect to send.
Return values
MAPLE_EOKOn success.
MAPLE_EAGAINIf the command couldn't be sent. Try again later.

Variable Documentation

◆ PURUPURU_EFFECT1_POWERSAVE

const uint8_t PURUPURU_EFFECT1_POWERSAVE = (15)
static

◆ PURUPURU_EFFECT1_PULSE

const uint8_t PURUPURU_EFFECT1_PULSE = (8 << 4)
static

◆ PURUPURU_EFFECT2_DECAY

const uint8_t PURUPURU_EFFECT2_DECAY = (8 << 4)
static

◆ PURUPURU_EFFECT2_PULSE

const uint8_t PURUPURU_EFFECT2_PULSE = (8)
static

◆ PURUPURU_SPECIAL_MOTOR1

const uint8_t PURUPURU_SPECIAL_MOTOR1 = (1 << 4)
static

◆ PURUPURU_SPECIAL_MOTOR2

const uint8_t PURUPURU_SPECIAL_MOTOR2 = (1 << 7)
static

◆ PURUPURU_SPECIAL_PULSE

const uint8_t PURUPURU_SPECIAL_PULSE = (1)
static