Lines Matching +full:dev +full:- +full:size

5  * SPDX-License-Identifier: Apache-2.0
52 /** Size of bands */
53 uint16_t size; member
89 typedef int (*cellular_api_configure_networks)(const struct device *dev,
91 uint8_t size);
94 typedef int (*cellular_api_get_supported_networks)(const struct device *dev,
96 uint8_t *size);
99 typedef int (*cellular_api_get_signal)(const struct device *dev,
103 typedef int (*cellular_api_get_modem_info)(const struct device *dev,
105 char *info, size_t size);
108 typedef int (*cellular_api_get_registration_status)(const struct device *dev,
133 * @param dev Cellular network device instance.
135 * @param size Size of list of cellular network configurations.
138 * @retval -EINVAL if any provided cellular network configuration is invalid or unsupported.
139 * @retval -ENOTSUP if API is not supported by cellular network device.
140 * @retval Negative errno-code otherwise.
142 static inline int cellular_configure_networks(const struct device *dev, in cellular_configure_networks() argument
143 const struct cellular_network *networks, uint8_t size) in cellular_configure_networks() argument
145 const struct cellular_driver_api *api = (const struct cellular_driver_api *)dev->api; in cellular_configure_networks()
147 if (api->configure_networks == NULL) { in cellular_configure_networks()
148 return -ENOSYS; in cellular_configure_networks()
151 return api->configure_networks(dev, networks, size); in cellular_configure_networks()
157 * @param dev Cellular network device instance
159 * @param size Size of list of cellular network configurations.
162 * @retval -ENOTSUP if API is not supported by cellular network device.
163 * @retval Negative errno-code otherwise.
165 static inline int cellular_get_supported_networks(const struct device *dev, in cellular_get_supported_networks() argument
167 uint8_t *size) in cellular_get_supported_networks() argument
169 const struct cellular_driver_api *api = (const struct cellular_driver_api *)dev->api; in cellular_get_supported_networks()
171 if (api->get_supported_networks == NULL) { in cellular_get_supported_networks()
172 return -ENOSYS; in cellular_get_supported_networks()
175 return api->get_supported_networks(dev, networks, size); in cellular_get_supported_networks()
181 * @param dev Cellular network device instance
186 * @retval -ENOTSUP if API is not supported by cellular network device.
187 * @retval -ENODATA if device is not in a state where signal can be polled
188 * @retval Negative errno-code otherwise.
190 static inline int cellular_get_signal(const struct device *dev, in cellular_get_signal() argument
193 const struct cellular_driver_api *api = (const struct cellular_driver_api *)dev->api; in cellular_get_signal()
195 if (api->get_signal == NULL) { in cellular_get_signal()
196 return -ENOSYS; in cellular_get_signal()
199 return api->get_signal(dev, type, value); in cellular_get_signal()
205 * @param dev Cellular network device instance
208 * @param size Info string size
211 * @retval -ENOTSUP if API is not supported by cellular network device.
212 * @retval -ENODATA if modem does not provide info requested
213 * @retval Negative errno-code from chat module otherwise.
215 static inline int cellular_get_modem_info(const struct device *dev, in cellular_get_modem_info() argument
217 size_t size) in cellular_get_modem_info() argument
219 const struct cellular_driver_api *api = (const struct cellular_driver_api *)dev->api; in cellular_get_modem_info()
221 if (api->get_modem_info == NULL) { in cellular_get_modem_info()
222 return -ENOSYS; in cellular_get_modem_info()
225 return api->get_modem_info(dev, type, info, size); in cellular_get_modem_info()
231 * @param dev Cellular network device instance
236 * @retval -ENOSYS if API is not supported by cellular network device.
237 * @retval -ENODATA if modem does not provide info requested
238 * @retval Negative errno-code from chat module otherwise.
240 static inline int cellular_get_registration_status(const struct device *dev, in cellular_get_registration_status() argument
244 const struct cellular_driver_api *api = (const struct cellular_driver_api *)dev->api; in cellular_get_registration_status()
246 if (api->get_registration_status == NULL) { in cellular_get_registration_status()
247 return -ENOSYS; in cellular_get_registration_status()
250 return api->get_registration_status(dev, tech, status); in cellular_get_registration_status()