-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSi4705_Lib.h
More file actions
48 lines (39 loc) · 909 Bytes
/
Si4705_Lib.h
File metadata and controls
48 lines (39 loc) · 909 Bytes
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
48
/*
*/
#ifndef Si4705_Lib_h
#define Si4705_Lib_h
#include "Arduino.h"
typedef struct
{
bool valid;
int tuneFrequency;
char rssi;
char snr;
char antenaCap;
} TuneStatus;
class Si4705_Lib
{
public:
Si4705_Lib(int resetPin, int sdioPin, int sclkPin);
int powerOn(); // call in setup
int bytesCommand(int howmany, unsigned char* parameters);
int readCommand(int howmany, unsigned char* result);
int setVolume(char value);
byte getVolume();
int setChannel(unsigned int channel);
int getChannel(TuneStatus* status);
int readRDS(unsigned char* message, long rdsTimeout);
int RDSConfig();
int seek(byte seekDirection);
void printBuffer(int howmany, unsigned char* buffer);
void printTuneStatus(TuneStatus status);
int getRev();
int timeout;
private:
int _resetPin;
int _sdioPin;
int _sclkPin;
static const int SI4705 = 0x63;
char rds[100];
};
#endif