PowerBlocks SDK
 
Loading...
Searching...
No Matches
wiimote_sys.h
1
15
16#pragma once
17
19
20#include <stdint.h>
21
22// Data structure describing the system config of wiimotes.
23// Changes to these WILL NOT be written back and reflected on the NAND as of currently for safety.
24// Documentation of these settings on https://wiibrew.org/wiki//shared2/sys/SYSCONF.
25typedef struct {
26 uint8_t sensor_bar_position; // Sensor bar on bottom = 0, or top = 1, of wii.
27 uint8_t motor_enabled; // Is the Motors globally enabled?
28 uint32_t ir_sensitivity; // IR Sensor sensitivity setting. 0-4
29 uint8_t speaker_volume; // Volume of the speaker in the wiimote
30
31 // Stores wiimotes connected to the wii while running via the "1" "2" button combo.
32 struct {
33 uint8_t count; // Number of guest wiimotes.
34 struct {
35 uint8_t mac_address[6]; // Stored backwards, wii cool like that
36 char name[64];
37 uint8_t link_key[16];
38 } entrys[6] PACKED;
39 } guest_wiimotes PACKED;
40
41
42
43 // Stores registered and active wiimotes.
44 struct {
45 uint8_t count; // Number of registered wiimotes.
46 struct {
47 uint8_t mac_address[6]; // Stored backwards, wii cool like that
48 char name[64];
49 } registered_entrys[10];
50
51 // Runtime active wiimote
52 struct {
53 uint8_t mac_address[6]; // Stored backwards, wii cool like that
54 char name[64];
55 } active_wiimotes[6];
56 } wiimotes PACKED;
58
59extern wiimote_sys_config_t wiimote_sys_config;
60
61// Phrases the wiimote settings from SYSCONFIG
62// If this fails, config will load to defaults
63extern void wiimote_sys_phrase_settings();
64
65// Attempt adding registered wiimotes
66extern void wiimote_connect_registered();
Definition wiimote_sys.h:25
Access parts of the base system.