sound volume configurable

This commit is contained in:
2024-05-21 12:31:55 +02:00
parent f9b63c06fe
commit faf75e158a
19 changed files with 129 additions and 27 deletions

View File

@ -4,7 +4,7 @@
#include "spi.h"
#define MAGIC 0xb001
#define MAGIC 0xb002
#define HIGHSCORE_ADDR 0x00
#define DUMMY 0x00
#define CMD_READ 0b00000011
@ -18,6 +18,7 @@ typedef struct {
uint16_t highScore;
uint8_t flashColor;
uint8_t brightness;
uint8_t amplitude;
} t_configBlock;
typedef union {
@ -93,3 +94,11 @@ void eepromSetBrightness(uint8_t v) {
buf.v.brightness = v;
}
uint8_t eepromReadAmplitude() {
return buf.v.amplitude;
}
void eepromSetAmplitude(uint8_t v) {
buf.v.amplitude = v;
}