-
Notifications
You must be signed in to change notification settings - Fork 8
/
TEA5767.h
47 lines (36 loc) · 844 Bytes
/
TEA5767.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
TEA5767 FM Radio Library
Using I2C for Communication
big12boy - 2017
*/
#include <Wire.h>
#ifndef TEA5767_h
#define TEA5767_h
class TEA5767{
private:
int _addr;
short _lvl, _rdy, _sel, _staCnt;
byte _freqH, _freqL;
bool _muted, _search, _up, _stby, _snc, _stereo;
float _stations[20];
void send();
void get();
public:
TEA5767();
short init(short minlvl);
bool setFrequency(float frequency);
void setMuted(bool muted);
bool setSearch(bool up, int level);
void setStandby(bool stby);
void setStereoNC(bool snc);
float getFrequency();
int getReady(); //0 Not Ready, 1 Ready, 2 Reached Limit
bool isStereo();
short getSignalLevel();
bool isMuted();
int findStations(short minlvl);
float nextStation();
float previousStation();
short getStations();
};
#endif