63#ifndef _SETTINGS_MANAGER_H_
64#define _SETTINGS_MANAGER_H_
73#include "colorchordTypes.h"
114uint16_t getBgmVolumeSetting(
void);
116bool setBgmVolumeSetting(uint16_t);
118uint16_t getSfxVolumeSetting(
void);
120bool setSfxVolumeSetting(uint16_t);
void readAllSettings(void)
Read all settings from NVM and set the appropriate hardware peripherals, like TFT and LED brightness.
Definition settingsManager.c:145
showSecrets_t
Definition settingsManager.h:87
@ HIDE_SECRETS
Definition settingsManager.h:89
@ SHOW_SECRETS
Definition settingsManager.h:88
bool incMicGainSetting(void)
Decrement the microphone gain setting by one. The new value is immediately used when sampling the mic...
Definition settingsManager.c:418
colorchordMode_t getColorchordModeSetting(void)
Get the current Colorchord LED output setting.
Definition settingsManager.c:464
bool setMicGainSetting(uint8_t newGain)
Set the current microphone gain setting. The new value is immediately used when sampling the micropho...
Definition settingsManager.c:398
gamepadTouch_t getGamepadTouchSetting(void)
Get the current Gamepad touch setting.
Definition settingsManager.c:560
const settingParam_t * getShowSecretsMenuSettingBounds(void)
Get the bounds for the setting to show Secrets menu on the main menu. Useful for initializing setting...
Definition settingsManager.c:602
const settingParam_t * getGamepadTouchSettingBounds(void)
Get the bounds for the Gamepad touch setting. Useful for initializing settings items in menus.
Definition settingsManager.c:570
bool setShowSecretsMenuSetting(showSecrets_t status)
Set the current setting to show Secrets menu on the main menu.
Definition settingsManager.c:613
bool setGamepadAccelSetting(bool status)
Set the current Gamepad accel setting.
Definition settingsManager.c:550
bool setTftBrightnessSetting(uint8_t newVal)
Set the current TFT brightness setting. This calls setTFTBacklightBrightness() after writing to NVS.
Definition settingsManager.c:292
uint16_t getScreensaverTimeSetting(void)
Get the current screensaver timeout setting.
Definition settingsManager.c:430
bool setScreensaverTimeSetting(uint16_t val)
Set the current screensaver timeout setting. The new value is immediately used for the screensaver ti...
Definition settingsManager.c:451
uint8_t getTftBrightnessSetting(void)
Get the current TFT brightness setting.
Definition settingsManager.c:271
bool setTestModePassedSetting(bool status)
Set the current test mode passed setting.
Definition settingsManager.c:498
bool incLedBrightnessSetting(void)
Increment the LED brightness setting by one. This calls setLedBrightness() after writing to NVS.
Definition settingsManager.c:345
bool setTutorialCompletedSetting(bool status)
Set the current tutorial completed setting.
Definition settingsManager.c:519
bool setLedBrightnessSetting(uint8_t brightness)
Set the current LED brightness setting. This calls setLedBrightness() after writing to NVS.
Definition settingsManager.c:330
const int32_t def
The default value for this setting, must be between min and max.
Definition settingsManager.h:103
bool setGamepadTouchSetting(gamepadTouch_t status)
Set the current Gamepad touch setting.
Definition settingsManager.c:581
uint8_t getLedBrightnessSetting(void)
Get the current LED brightness.
Definition settingsManager.c:309
const settingParam_t * getScreensaverTimeSettingBounds(void)
Get the bounds for the screensaver timeout setting. Useful for initializing settings items in menus.
Definition settingsManager.c:440
const settingParam_t * getGamepadAccelSettingBounds(void)
Get the bounds for the Gamepad accel setting. Useful for initializing settings items in menus.
Definition settingsManager.c:539
bool decMicGainSetting(void)
Decrement the microphone gain setting by one. The new value is immediately used when sampling the mic...
Definition settingsManager.c:408
const int32_t min
The minimum value for this setting, inclusive.
Definition settingsManager.h:101
uint8_t getMicGainSetting(void)
Get the current microphone gain setting.
Definition settingsManager.c:377
showSecrets_t getShowSecretsMenuSetting(void)
Get the current setting to show Secrets menu on the main menu.
Definition settingsManager.c:591
const settingParam_t * getLedBrightnessSettingBounds(void)
Get the bounds for the LED brightness setting. Useful for initializing settings items in menus.
Definition settingsManager.c:319
bool getTestModePassedSetting(void)
Get the current test mode passed setting.
Definition settingsManager.c:487
const settingParam_t * getTftBrightnessSettingBounds(void)
Get the bounds for the TFT brightness setting. Useful for initializing settings items in menus.
Definition settingsManager.c:281
const char * key
The NVS key for this setting.
Definition settingsManager.h:104
const settingParam_t * getMicGainSettingBounds(void)
Get the bounds for the microphone gain setting. Useful for initializing settings items in menus.
Definition settingsManager.c:387
bool getTutorialCompletedSetting(void)
Get the current tutorial completed setting.
Definition settingsManager.c:508
bool getGamepadAccelSetting(void)
Get the current Gamepad accel setting.
Definition settingsManager.c:529
bool setColorchordModeSetting(colorchordMode_t)
Set the current Colorchord LED output setting. The new value is immediately used when sampling the mi...
Definition settingsManager.c:475
bool decLedBrightnessSetting(void)
Decrement the LED brightness setting by one. This calls setLedBrightness() after writing to NVS.
Definition settingsManager.c:360
const int32_t max
The maximum value for this setting, inclusive.
Definition settingsManager.h:102
gamepadTouch_t
Definition settingsManager.h:80
@ GAMEPAD_TOUCH_L_STICK_SETTING
Definition settingsManager.h:82
@ GAMEPAD_TOUCH_R_STICK_SETTING
Definition settingsManager.h:83
@ GAMEPAD_TOUCH_MORE_BUTTONS_SETTING
Definition settingsManager.h:81
Immutable data for a setting, including minimum, maximum, and default values, and the NVS key.
Definition settingsManager.h:100