Skip to content

Commit d81dbba

Browse files
lgehrekecfriedt
authored andcommitted
drivers: modem: sim7080: Added missing doxygen docu to public header.
Added missing doxygen comments to public header. Signed-off-by: Lukas Gehreke <[email protected]>
1 parent 11710b6 commit d81dbba

File tree

1 file changed

+87
-76
lines changed

1 file changed

+87
-76
lines changed

include/zephyr/drivers/modem/simcom-sim7080.h

Lines changed: 87 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
/*
1+
/** @file
2+
* @brief Simcom SIM7080 modem public API header file.
3+
*
24
* Copyright (C) 2021 metraTec GmbH
35
*
46
* SPDX-License-Identifier: Apache-2.0
@@ -16,18 +18,23 @@
1618
extern "C" {
1719
#endif
1820

21+
/** Maximum Length of GNSS UTC data */
1922
#define SIM7080_GNSS_DATA_UTC_LEN 20
23+
/** Maximum SMS length */
2024
#define SIM7080_SMS_MAX_LEN 160
25+
/** Maximum UE system information band size */
2126
#define SIM7080_UE_SYS_INFO_BAND_SIZE 32
2227

28+
/** Sim7080 modem state */
2329
enum sim7080_state {
24-
SIM7080_STATE_INIT = 0,
25-
SIM7080_STATE_IDLE,
26-
SIM7080_STATE_NETWORKING,
27-
SIM7080_STATE_GNSS,
28-
SIM7080_STATE_OFF,
30+
SIM7080_STATE_INIT = 0, /**< Initial modem state */
31+
SIM7080_STATE_IDLE, /**< Modem idle */
32+
SIM7080_STATE_NETWORKING, /**< Network active */
33+
SIM7080_STATE_GNSS, /**< GNSS active */
34+
SIM7080_STATE_OFF, /**< Modem off */
2935
};
3036

37+
/** Sim7080 gnss data structure */
3138
struct sim7080_gnss_data {
3239
/**
3340
* Whether gnss is powered or not.
@@ -67,145 +74,149 @@ struct sim7080_gnss_data {
6774
uint16_t kmh;
6875
};
6976

70-
/**
71-
* Possible sms states in memory.
72-
*/
77+
/** Possible sms states in memory. */
7378
enum sim7080_sms_stat {
74-
SIM7080_SMS_STAT_REC_UNREAD = 0,
75-
SIM7080_SMS_STAT_REC_READ,
76-
SIM7080_SMS_STAT_STO_UNSENT,
77-
SIM7080_SMS_STAT_STO_SENT,
78-
SIM7080_SMS_STAT_ALL,
79+
SIM7080_SMS_STAT_REC_UNREAD = 0, /**< Message unread */
80+
SIM7080_SMS_STAT_REC_READ, /**< Message read*/
81+
SIM7080_SMS_STAT_STO_UNSENT, /**< Message stored unsent */
82+
SIM7080_SMS_STAT_STO_SENT, /**< Message stored sent */
83+
SIM7080_SMS_STAT_ALL, /**< Status count */
7984
};
8085

81-
/**
82-
* Possible ftp return codes.
83-
*/
86+
/** Possible ftp return codes. */
8487
enum sim7080_ftp_rc {
85-
/* Operation finished correctly. */
86-
SIM7080_FTP_RC_OK = 0,
87-
/* Session finished. */
88-
SIM7080_FTP_RC_FINISHED,
89-
/* An error occurred. */
90-
SIM7080_FTP_RC_ERROR,
88+
SIM7080_FTP_RC_OK = 0, /**< Operation finished correctly. */
89+
SIM7080_FTP_RC_FINISHED, /**< Session finished. */
90+
SIM7080_FTP_RC_ERROR, /**< An error occurred. */
9191
};
9292

9393
/**
9494
* Buffer structure for sms.
9595
*/
9696
struct sim7080_sms {
97-
/* First octet of the sms. */
97+
/** First octet of the sms. */
9898
uint8_t first_octet;
99-
/* Message protocol identifier. */
99+
/** Message protocol identifier. */
100100
uint8_t tp_pid;
101-
/* Status of the sms in memory. */
101+
/** Status of the sms in memory. */
102102
enum sim7080_sms_stat stat;
103-
/* Index of the sms in memory. */
103+
/** Index of the sms in memory. */
104104
uint16_t index;
105-
/* Time the sms was received. */
105+
/** Time the sms was received. */
106106
struct {
107-
uint8_t year;
108-
uint8_t month;
109-
uint8_t day;
110-
uint8_t hour;
111-
uint8_t minute;
112-
uint8_t second;
113-
uint8_t timezone;
107+
uint8_t year; /**< Current Year */
108+
uint8_t month; /**< Month of the year */
109+
uint8_t day; /**< Day of the month */
110+
uint8_t hour; /**< Hour of the day */
111+
uint8_t minute; /**< Minute */
112+
uint8_t second; /**< Second */
113+
uint8_t timezone; /**< Current timezone */
114114
} time;
115-
/* Buffered sms. */
115+
/** Buffered sms. */
116116
char data[SIM7080_SMS_MAX_LEN + 1];
117-
/* Length of the sms in buffer. */
117+
/** Length of the sms in buffer. */
118118
uint8_t data_len;
119119
};
120120

121121
/**
122122
* Buffer structure for sms reads.
123123
*/
124124
struct sim7080_sms_buffer {
125-
/* sms structures to read to. */
125+
/** sms structures to read to. */
126126
struct sim7080_sms *sms;
127-
/* Number of sms structures. */
127+
/** Number of sms structures. */
128128
uint8_t nsms;
129129
};
130130

131+
/** UE system mode */
131132
enum sim7080_ue_sys_mode {
132-
SIM7080_UE_SYS_MODE_NO_SERVICE,
133-
SIM7080_UE_SYS_MODE_GSM,
134-
SIM7080_UE_SYS_MODE_LTE_CAT_M1,
135-
SIM7080_UE_SYS_MODE_LTE_NB_IOT,
133+
SIM7080_UE_SYS_MODE_NO_SERVICE, /**< No service */
134+
SIM7080_UE_SYS_MODE_GSM, /**< GSM */
135+
SIM7080_UE_SYS_MODE_LTE_CAT_M1, /**< LTE CAT M1 */
136+
SIM7080_UE_SYS_MODE_LTE_NB_IOT, /**< LTE NB IOT */
136137
};
137138

139+
/** UE operating mode */
138140
enum sim7080_ue_op_mode {
139-
SIM7080_UE_OP_MODE_ONLINE,
140-
SIM7080_UE_OP_MODE_OFFLINE,
141-
SIM7080_UE_OP_MODE_FACTORY_TEST_MODE,
142-
SIM7080_UE_OP_MODE_RESET,
143-
SIM7080_UE_OP_MODE_LOW_POWER_MODE,
141+
SIM7080_UE_OP_MODE_ONLINE, /**< Online */
142+
SIM7080_UE_OP_MODE_OFFLINE, /**< Offline */
143+
SIM7080_UE_OP_MODE_FACTORY_TEST_MODE, /**< Factory test mode */
144+
SIM7080_UE_OP_MODE_RESET, /**< Reset */
145+
SIM7080_UE_OP_MODE_LOW_POWER_MODE, /**< Low power mode */
144146
};
145147

148+
/**
149+
* Sim7080 ue system information structure for gsm.
150+
*/
146151
struct sim7080_ue_sys_info_gsm {
147-
/* Mobile country code */
152+
/** Mobile country code */
148153
uint16_t mcc;
149-
/* Mobile network code */
154+
/** Mobile network code */
150155
uint16_t mcn;
151-
/* Location area code */
156+
/** Location area code */
152157
uint16_t lac;
153-
/* Cell ID */
158+
/** Cell ID */
154159
uint16_t cid;
155-
/* Absolute radio frequency channel number */
160+
/** Absolute radio frequency channel number */
156161
uint8_t arfcn[SIM7080_UE_SYS_INFO_BAND_SIZE + 1];
157-
/* RX level in dBm */
162+
/** RX level in dBm */
158163
int16_t rx_lvl;
159-
/* Track LO adjust */
164+
/** Track LO adjust */
160165
int16_t track_lo_adjust;
161-
/* C1 coefficient */
166+
/** C1 coefficient */
162167
uint16_t c1;
163-
/* C2 coefficient */
168+
/** C2 coefficient */
164169
uint16_t c2;
165170
};
166171

172+
/**
173+
* Sim7080 ue system information structure for LTE.
174+
*/
167175
struct sim7080_ue_sys_info_lte {
168-
/* Mobile country code */
176+
/** Mobile country code */
169177
uint16_t mcc;
170-
/* Mobile network code */
178+
/** Mobile network code */
171179
uint16_t mcn;
172-
/* Tracing area code */
180+
/** Tracing area code */
173181
uint16_t tac;
174-
/* Serving Cell ID */
182+
/** Serving Cell ID */
175183
uint32_t sci;
176-
/* Physical Cell ID */
184+
/** Physical Cell ID */
177185
uint16_t pci;
178-
/* Frequency band */
186+
/** Frequency band */
179187
uint8_t band[SIM7080_UE_SYS_INFO_BAND_SIZE + 1];
180-
/* E-UTRA absolute radio frequency channel number */
188+
/** E-UTRA absolute radio frequency channel number */
181189
uint16_t earfcn;
182-
/* Downlink bandwidth in MHz */
190+
/** Downlink bandwidth in MHz */
183191
uint16_t dlbw;
184-
/* Uplink bandwidth in MHz */
192+
/** Uplink bandwidth in MHz */
185193
uint16_t ulbw;
186-
/* Reference signal received quality in dB */
194+
/** Reference signal received quality in dB */
187195
int16_t rsrq;
188-
/* Reference signal received power in dBm */
196+
/** Reference signal received power in dBm */
189197
int16_t rsrp;
190-
/* Received signal strength indicator in dBm */
198+
/** Received signal strength indicator in dBm */
191199
int16_t rssi;
192-
/* Reference signal signal to noise ratio in dB */
200+
/** Reference signal signal to noise ratio in dB */
193201
int16_t rssnr;
194-
/* Signal to interference plus noise ratio in dB */
202+
/** Signal to interference plus noise ratio in dB */
195203
int16_t sinr;
196204
};
197205

206+
/**
207+
* Sim7080 ue system information structure.
208+
*/
198209
struct sim7080_ue_sys_info {
199-
/* Refer to sim7080_ue_sys_mode */
210+
/** Refer to sim7080_ue_sys_mode */
200211
enum sim7080_ue_sys_mode sys_mode;
201-
/* Refer to sim7080_ue_op_mode */
212+
/** Refer to sim7080_ue_op_mode */
202213
enum sim7080_ue_op_mode op_mode;
203214
union {
204-
/* Only set if sys_mode is GSM */
215+
/** Only set if sys_mode is GSM */
205216
struct sim7080_ue_sys_info_gsm gsm;
206-
/* Only set if sys mode is LTE CAT-M1/NB-IOT */
217+
/** Only set if sys mode is LTE CAT-M1/NB-IOT */
207218
struct sim7080_ue_sys_info_lte lte;
208-
} cell;
219+
} cell; /**< Cell information */
209220
};
210221

211222
/**

0 commit comments

Comments
 (0)