diff options
Diffstat (limited to 'firmware/drivers/tuner/tea5767.c')
-rw-r--r-- | firmware/drivers/tuner/tea5767.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/firmware/drivers/tuner/tea5767.c b/firmware/drivers/tuner/tea5767.c index 67aa808f23..3f3af68602 100644 --- a/firmware/drivers/tuner/tea5767.c +++ b/firmware/drivers/tuner/tea5767.c | |||
@@ -34,6 +34,10 @@ | |||
34 | #define I2C_ADR 0xC0 | 34 | #define I2C_ADR 0xC0 |
35 | #endif | 35 | #endif |
36 | 36 | ||
37 | /* define RSSI range */ | ||
38 | #define RSSI_MIN 10 | ||
39 | #define RSSI_MAX 55 | ||
40 | |||
37 | static bool tuner_present = true; | 41 | static bool tuner_present = true; |
38 | static unsigned char write_bytes[5] = { 0x00, 0x00, 0x00, 0x00, 0x00 }; | 42 | static unsigned char write_bytes[5] = { 0x00, 0x00, 0x00, 0x00, 0x00 }; |
39 | 43 | ||
@@ -132,6 +136,18 @@ int tea5767_get(int setting) | |||
132 | case RADIO_STEREO: | 136 | case RADIO_STEREO: |
133 | val = read_bytes[2] >> 7; | 137 | val = read_bytes[2] >> 7; |
134 | break; | 138 | break; |
139 | |||
140 | case RADIO_RSSI: | ||
141 | val = 10 + 3*(read_bytes[3] >> 4); | ||
142 | break; | ||
143 | |||
144 | case RADIO_RSSI_MIN: | ||
145 | val = RSSI_MIN; | ||
146 | break; | ||
147 | |||
148 | case RADIO_RSSI_MAX: | ||
149 | val = RSSI_MAX; | ||
150 | break; | ||
135 | } | 151 | } |
136 | 152 | ||
137 | return val; | 153 | return val; |