Changed the playing code to use Playlists managed by a PlaylistManager. This allows you to have randomized playlists and stuff. Also, you can now access special functions via the contents of RFID tags. See the README for a list of available modes.

This commit is contained in:
2019-11-14 20:42:02 +01:00
parent 0d64366241
commit 0cddfaf0d9
11 changed files with 412 additions and 344 deletions

View File

@ -6,7 +6,7 @@
class SPIMaster {
public:
SPIMaster() {
static void init() {
PIN_SD_CS_SETUP();
PIN_VS1053_XCS_SETUP();
PIN_VS1053_XDCS_SETUP();
@ -14,27 +14,27 @@ public:
disable();
}
void select_sd(bool enabled=true) {
static void select_sd(bool enabled=true) {
PIN_SD_CS(enabled ? LOW : HIGH);
delayMicroseconds(MCP_SPI_SETTING_DELAY);
}
void select_vs1053_xcs(bool enabled=true) {
static void select_vs1053_xcs(bool enabled=true) {
PIN_VS1053_XCS(enabled ? LOW : HIGH);
delayMicroseconds(MCP_SPI_SETTING_DELAY);
}
void select_vs1053_xdcs(bool enabled=true) {
static void select_vs1053_xdcs(bool enabled=true) {
PIN_VS1053_XDCS(enabled ? LOW : HIGH);
delayMicroseconds(MCP_SPI_SETTING_DELAY);
}
void select_rc522(bool enabled=true) {
static void select_rc522(bool enabled=true) {
PIN_RC522_CS(enabled ? LOW : HIGH);
delayMicroseconds(MCP_SPI_SETTING_DELAY);
}
void disable() {
static void disable() {
PIN_SD_CS(HIGH);
PIN_VS1053_XCS(HIGH);
PIN_VS1053_XDCS(HIGH);