35#ifndef __DC_MAPLE_PURUPURU_H
36#define __DC_MAPLE_PURUPURU_H
59typedef union purupuru_effect {
64 uint8_t special __depr(
"Please see purupuru_effect_t which has new members.");
65 uint8_t effect1 __depr(
"Please see purupuru_effect_t which has new members.");
66 uint8_t effect2 __depr(
"Please see purupuru_effect_t which has new members.");
67 uint8_t duration __depr(
"Please see purupuru_effect_t which has new members.");
96static inline uint32_t __depr(
"Please see purupuru_effect_t for modern equivalent.") PURUPURU_EFFECT2_UINTENSITY(uint8_t x) {
return (x << 4);}
97static inline uint32_t __depr(
"Please see purupuru_effect_t for modern equivalent.") PURUPURU_EFFECT2_LINTENSITY(uint8_t x) {
return (x);}
98static inline uint32_t __depr(
"Please see purupuru_effect_t for modern equivalent.") PURUPURU_EFFECT1_INTENSITY(uint8_t x) {
return (x << 4);}
136void purupuru_init(
void);
137void purupuru_shutdown(
void);
Various common macros used throughout the codebase.
static uint32_t("Please see purupuru_effect_t for modern equivalent.") PURUPURU_EFFECT2_UINTENSITY(uint8_t x)
Definition purupuru.h:96
static const uint8_t PURUPURU_SPECIAL_MOTOR2("Please see purupuru_effect_t for modern equivalent.")
int purupuru_rumble_raw(maple_device_t *dev, uint32_t effect)
Send a raw effect to a jump pack.
int purupuru_rumble(maple_device_t *dev, const purupuru_effect_t *effect)
Send an effect to a jump pack.
static const uint8_t PURUPURU_SPECIAL_PULSE("Please see purupuru_effect_t for modern equivalent.")
static const uint8_t PURUPURU_EFFECT2_DECAY("Please see purupuru_effect_t for modern equivalent.")
static const uint8_t PURUPURU_EFFECT2_PULSE("Please see purupuru_effect_t for modern equivalent.")
static const uint8_t PURUPURU_EFFECT1_POWERSAVE("Please see purupuru_effect_t for modern equivalent.")
static const uint8_t PURUPURU_EFFECT1_PULSE("Please see purupuru_effect_t for modern equivalent.")
static const uint8_t PURUPURU_SPECIAL_MOTOR1("Please see purupuru_effect_t for modern equivalent.")
Maple Bus driver interface.
One maple device.
Definition maple.h:271
Effect generation structure.
Definition purupuru.h:59
uint8_t freq
Vibration frequency.
Definition purupuru.h:87
uint32_t fpow
Forward direction (+ direction) intensity setting bits.
Definition purupuru.h:82
uint32_t res
Reserved.
Definition purupuru.h:73
uint8_t inc
Vibration inclination period.
Definition purupuru.h:89
uint32_t motor
Motor number.
Definition purupuru.h:75
uint32_t raw
Access the raw 32-bit value to be sent to the puru.
Definition purupuru.h:61
bool div
Divergent vibration.
Definition purupuru.h:80
uint32_t bpow
Backward direction (- direction) intensity setting bits.
Definition purupuru.h:78
bool conv
Convergent vibration.
Definition purupuru.h:84
bool cont
Continuous Vibration.
Definition purupuru.h:71