summaryrefslogtreecommitdiffstats
path: root/binding/radio_impl.h
diff options
context:
space:
mode:
authorEhsan Takalloo <ehsan.takalloo@gmail.com>2020-09-14 16:18:47 +0430
committerEhsan Takalloo <ehsan.takalloo@gmail.com>2020-10-28 10:24:23 +0330
commitd4fb6eb7a4648b74f930af667f9231226e4ce208 (patch)
treedb267fab2460380f67fa5184c50e7fe9f84087fe /binding/radio_impl.h
parent8958a8a3e98085c60c9cd803395be157e78e3565 (diff)
Add support for tuning to alternative frequency
-Add a new verb for handling alternative frequency. -Add a new structure (station_quality_t) and use it for sharing quality parameters. -Make tef665x implementations compatible with new structure. -Update README.md file to cover new verbs. Change-Id: Id78e3b9aa8896eca9ef44222657f21246de9914f Signed-off-by: Ehsan Takalloo <ehsan.takalloo@gmail.com>
Diffstat (limited to 'binding/radio_impl.h')
-rw-r--r--binding/radio_impl.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/binding/radio_impl.h b/binding/radio_impl.h
index 2867d7f..8f1ee94 100644
--- a/binding/radio_impl.h
+++ b/binding/radio_impl.h
@@ -40,6 +40,34 @@ typedef enum {
STEREO
} radio_stereo_mode_t;
+/*
+ * AF_update
+ * true if quality belongs to an alternative frequency
+ *
+ * time_stamp
+ * if time_stamp is zero, quality data won't be valid
+ * reliability depending on time stamp
+ * it takes some time after tuning to get valid quality data
+ *
+ * rssi
+ * (signed)
+ * level detector result(RF input level)
+ *
+ * usn
+ * FM ultrasonic noise detector (relative usn detector result)
+ *
+ * bandwidth
+ * IF bandwidth
+ */
+typedef struct
+{
+ bool af_update;
+ uint16_t time_stamp;
+ int16_t rssi;
+ uint16_t usn;
+ uint16_t bandw;
+} station_quality_t;
+
typedef struct {
char *name;
@@ -86,6 +114,9 @@ typedef struct {
char * (*get_rds_info)(void);
+ station_quality_t * (*get_quality_info)(void);
+
+ void (*set_alternative_frequency)(uint32_t frequency);
} radio_impl_ops_t;
#endif /* _RADIO_IMPL_H */