From eea9be3349f271ec05c2b20176d8eb0353d2e6fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niccol=C3=B2=20Izzo?= Date: Fri, 4 Jun 2021 18:14:07 +0200 Subject: [PATCH] Add M17 codeplug data structures --- openrtx/include/cps.h | 13 +++++++++++++ openrtx/include/state.h | 10 ++++++++++ 2 files changed, 23 insertions(+) diff --git a/openrtx/include/cps.h b/openrtx/include/cps.h index 5c0a0c81..fb75472e 100644 --- a/openrtx/include/cps.h +++ b/openrtx/include/cps.h @@ -72,6 +72,18 @@ typedef struct } __attribute__((packed)) dmrInfo_t; +/** + * Data structure containing all and only the information for M17 channels. + */ +typedef struct +{ + uint8_t rxCan : 4, /**< Channel Access Number for RX squelch */ + txCan : 4; /**< Channel Access Number for TX squelch */ + + uint16_t contactName_index; /**< Index to retrieve data from contact list */ +} +__attribute__((packed)) m17Info_t; + /** * Data structure containing all the information of a channel, either FM or DMR. */ @@ -104,6 +116,7 @@ typedef struct { fmInfo_t fm; /**< Information block for FM channels */ dmrInfo_t dmr; /**< Information block for DMR channels */ + m17Info_t m17; /**< Information block for M17 channels */ }; } __attribute__((packed)) channel_t; diff --git a/openrtx/include/state.h b/openrtx/include/state.h index b572d94b..4adfe729 100644 --- a/openrtx/include/state.h +++ b/openrtx/include/state.h @@ -60,6 +60,15 @@ typedef struct } gps_t; +/** + * Data structure representing the settings of the M17 mode. + */ +typedef struct +{ + char callsign[10]; +} +m17_t; + /** * Part of this structure has been commented because the corresponding * functionality is not yet implemented. @@ -95,6 +104,7 @@ typedef struct bool emergency; settings_t settings; gps_t gps_data; + m17_t m17_data; } state_t;