You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MCU_PWRSTAT_SHELL_OPEN=BIT(1), ///< Set if the shell is open.
160
+
MCU_PWRSTAT_ADAPTER_CONNECTED=BIT(3), ///< Set if the AC adapter is connected.
161
+
MCU_PWRSTAT_CHARGING=BIT(4), ///< Set if the battery is charging.
162
+
MCU_PWRSTAT_BOTTOM_BL_ON=BIT(5), ///< Set if the bottom backlight is on.
163
+
MCU_PWRSTAT_TOP_BL_ON=BIT(6), ///< Set if the top backlight is on.
164
+
MCU_PWRSTAT_LCD_ON=BIT(7) ///< Set if the LCDs are on.
165
+
};
166
+
167
+
enumMCU_PedometerControl
168
+
{
169
+
MCU_PEDOMETER_CLEAR=BIT(0), ///< Clear the step history.
170
+
MCU_PEDOMETER_STEPS_FULL=BIT(4) ///< Set when the step history is full.
171
+
};
172
+
173
+
enumMCU_PowerTrigger
174
+
{
175
+
MCU_PWR_SHUTDOWN=BIT(0), ///< Turn off the system.
176
+
MCU_PWR_RESET=BIT(1), ///< Reset the MCU.
177
+
MCU_PWR_REBOOT=BIT(2), ///< Reboot the system.
178
+
MCU_PWR_LGY_SHUTDOWN=BIT(3), ///< Turn off the system. (Used by LgyBg)
179
+
MCU_PWR_SLEEP=BIT(4), ///< Signal to enter sleep mode.
180
+
OLDMCU_BL_OFF=BIT(4), ///< (Old MCU_FIRM only) turn the backlights off.
181
+
OLDMCU_BL_ON=BIT(5), ///< (Old MCU_FIRM only) turn the backlights on.
182
+
OLDMCU_LCD_OFF=BIT(6), ///< (Old MCU_FIRM only) turn the LCDs off.
183
+
OLDMCU_LCD_ON=BIT(7), ///< (Old MCU_FIRM only) turn the LCDs on.
184
+
};
185
+
186
+
typedefenumMCU_PowerLedState
187
+
{
188
+
LED_NORMAL=0, ///< Fade power LED to blue, while checking for battery percentage.
189
+
LED_FADE_BLUE=1, ///< Fade power LED to blue.
190
+
LED_SLEEP_MODE=2, ///< The power LED pulses blue slowly, as it does in sleep mode.
191
+
LED_OFF=3, ///< Power LED fades off.
192
+
LED_RED=4, ///< Power LED instantaneously turns red.
193
+
LED_BLUE=5, ///< Power LED instantaneously turns blue.
194
+
LED_BLINK_RED=6, ///< Power LED and info (notification) LED blink red, as they do when the battery is critically low.
195
+
} MCU_PowerLedState;
196
+
197
+
typedefstructMCU_InfoLedAnimation
198
+
{
199
+
u8ticksPerFrame; ///< The amount of time (in ticks), for which a given frame is active. Must be nonzero. (See @ref mcuTicksFromMs)
200
+
u8frameTransitionDelay; ///< Amount of time (in ticks) between pattern frames. (See @ref mcuTicksFromMs) Set to 0 to disable interpolation, or equal to ticksPerFrame for linear interpolation.
201
+
u8numLastFrameRepeats; ///< The amount of times for which the last frame should be repeated. Treated as if the pattern contains numLastFrameRepeats more of the last frame than it actually does. Set to 0xFF to repeat forever.
202
+
u8_pad;
203
+
} MCU_InfoLedAnimation;
204
+
205
+
typedefstructMCU_InfoLedPattern
206
+
{
207
+
MCU_InfoLedAnimationanimation; ///< Animation.
208
+
u8redPattern[32]; ///< Pattern for red component.
209
+
u8greenPattern[32]; ///< Pattern for green component.
210
+
u8bluePattern[32]; ///< Pattern for blue component.
211
+
} MCU_InfoLedPattern;
212
+
213
+
typedefenumMCU_WifiMode
214
+
{
215
+
WIFI_MODE_CTR=0, ///< 3DS WiFi mode.
216
+
WIFI_MODE_MP=1, ///< DS[i] WiFi mode ("MP").
217
+
} MCU_WifiMode;
218
+
219
+
typedefstructMCU_RtcTime
220
+
{
221
+
u8second; ///< RTC second.
222
+
u8minute; ///< RTC minute.
223
+
u8hour; ///< RTC hour.
224
+
u8weekday; ///< RTC day of the week.
225
+
u8monthday; ///< RTC day of the month.
226
+
u8month; ///< RTC month.
227
+
u8year; ///< RTC year (since 2000).
228
+
} MCU_RtcTime;
229
+
230
+
typedefstructMCU_RtcAlarmTime
231
+
{
232
+
u8minute; ///< RTC alarm minute.
233
+
u8hour; ///< RTC alarm hour.
234
+
u8day; ///< RTC alarm day.
235
+
u8month; ///< RTC alarm day of the month.
236
+
u8year; ///< RTC alarm year (since 2000).
237
+
} CTR_PACKEDMCU_RtcAlarmTime;
238
+
239
+
typedefenumMCU_SensorConfig
240
+
{
241
+
MCU_SENSOR_ACCELEROMETER_ENABLE=BIT(0), ///< If set, the accelerometer is enabled.
242
+
MCU_SENSOR_PEDOMETER_ENABLE=BIT(1), ///< If set, the pedometer is enabled.
243
+
} MCU_SensorConfig;
244
+
245
+
typedefstructMCU_AccelerometerData
246
+
{
247
+
s16x; ///< X coordinate of the current accelerometer sample.
248
+
s16y; ///< Y coordinate of the current accelerometer sample.
249
+
s16z; ///< Z coordinate of the current accelerometer sample.
250
+
} MCU_AccelerometerData;
251
+
252
+
typedefstructMCU_PedometerStepData
253
+
{
254
+
structMCU_PedometerTime
255
+
{
256
+
u8hour; ///< RTC hour at the time of the update.
257
+
u8monthday; ///< RTC day of the month at the time of the update.
258
+
u8month; ///< RTC month at the time of the update.
259
+
u8year; ///< RTC year (since 2000) at the time of the update.
260
+
u8minute; ///< RTC minute at the time of the update.
261
+
u8second; ///< RTC second at the time of the update.
262
+
} pedometerTime; ///< RTC timestamp for the time this data was last updated.
263
+
u16stepCounts[7*24]; ///< Step counts for every hour in the week, with the last element referring to the current hour.
264
+
} CTR_PACKEDMCU_PedometerStepData;
265
+
266
+
typedefenumMCU_AccelerometerScale
267
+
{
268
+
ACC_SCALE_2G=0x0, ///< -2G to 2G
269
+
ACC_SCALE_4G=0x1, ///< -4G to 4G
270
+
ACC_SCALE_8G=0x3, ///< -8G to 8G
271
+
} MCU_AccelerometerScale;
272
+
273
+
typedefstructMCU_LgyLcdSettings
274
+
{
275
+
u8enableAblPowersave : 1; ///< Whether or not ABL (adaptive backlight) power save is enabled.
276
+
u8luminanceLevel : 3; ///< The brightness level (1-5).
277
+
u8_unused : 4;
278
+
} MCU_LgyLcdSettings;
279
+
280
+
staticinlineu8mcuTicksFromMs(u32ms)
281
+
{
282
+
// 512Hz
283
+
u32res=512u*ms / 1000u;
284
+
res=res<2 ? 1 : res-1; // res not allowed to be zero
0 commit comments