code upload

This commit is contained in:
e2002
2022-02-04 17:30:12 +03:00
parent fe3f0a261e
commit 3565d2fa17
44 changed files with 25103 additions and 1 deletions

36
yoRadio/player.h Normal file
View File

@@ -0,0 +1,36 @@
#ifndef player_h
#define player_h
#include "src/audioI2S/AudioEx.h"
enum audioMode_e { PLAYING, STOPPED };
struct audiorequest_t
{
uint16_t station;
int volume;
bool doSave;
};
class Player: public Audio {
public:
audioMode_e mode;
audiorequest_t request;
bool requesToStart;
public:
void init();
void loop();
void zeroRequest();
void play(byte stationId);
void prev();
void next();
void toggle();
void stepVol(bool up);
void setVol(byte volume, bool inside);
byte volToI2S(byte volume);
void stopInfo();
};
extern Player player;
#endif