-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathfmberryd.h
47 lines (39 loc) · 1.52 KB
/
fmberryd.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
/*
FMBerry - an cheap and easy way of transmitting music with your Pi.
Copyright (C) 2011-2013 by Manawyrm
Copyright (C) 2013 by Andrey Chilikin (achilikin@gmail.com)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __FMBERRYD_H_FMBERRY_
#define __FMBERRYD_H_FMBERRY_
#include <stdint.h>
typedef struct _mmr70_data
{
int frequency;
int power;
int mute;
int gain;
int volume;
int txpower;
int stereo;
int rds;
char rdsid[10]; // max length of id is 8, but need spare null for printing
char rdstext[66]; // same here, max 64 chars, 2 nulls are extra (need only 1, but I do not like odd numbers)
}mmr70_data_t;
extern mmr70_data_t mmr70;
int main(int argc, char **argv);
// true if string is equal to the second argument
int str_is(const char *str, const char *is);
int str_is_arg(const char *str, const char *is, const char **arg);
int ListenTCP(uint16_t port);
int ProcessTCP(int sock, mmr70_data_t *pdata);
#endif