1 /* 2 * Copyright (c) 2023 Bjarki Arge Andreasen 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #ifndef ZEPHYR_DRIVERS_GNSS_GNSS_DUMP_H_ 8 #define ZEPHYR_DRIVERS_GNSS_GNSS_DUMP_H_ 9 10 #include <zephyr/drivers/gnss.h> 11 12 /** 13 * @brief Dump struct gnss_info as string 14 * 15 * @param str Destination for dumped GNSS info 16 * @param strsize Size of str 17 * @param info GNSS info to dump 18 * 19 * @retval 0 if GNSS info successfully dumped 20 * @retval -ENOMEM if strsize too small 21 */ 22 int gnss_dump_info(char *str, uint16_t strsize, const struct gnss_info *info); 23 24 /** 25 * @brief Dump struct navigation_data as string 26 * 27 * @param str Destination for dumped navigation data 28 * @param strsize Size of str 29 * @param nav_data Navigation data to dump 30 * 31 * @retval 0 if navigation data successfully dumped 32 * @retval -ENOMEM if strsize too small 33 */ 34 int gnss_dump_nav_data(char *str, uint16_t strsize, const struct navigation_data *nav_data); 35 36 /** 37 * @brief Dump struct gnss_time as string 38 * 39 * @param str Destination for dumped GNSS time 40 * @param strsize Size of str 41 * @param utc GNSS time to dump 42 * 43 * @retval 0 if GNSS time successfully dumped 44 * @retval -ENOMEM if strsize too small 45 */ 46 int gnss_dump_time(char *str, uint16_t strsize, const struct gnss_time *utc); 47 48 /** 49 * @brief Dump struct gnss_satellite as string 50 * 51 * @param str Destination for dumped GNSS satellite 52 * @param strsize Size of str 53 * @param utc GNSS satellite to dump 54 * 55 * @retval 0 if GNSS satellite successfully dumped 56 * @retval -ENOMEM if strsize too small 57 */ 58 int gnss_dump_satellite(char *str, uint16_t strsize, const struct gnss_satellite *satellite); 59 60 #endif /* ZEPHYR_DRIVERS_GNSS_GNSS_DUMP_H_ */ 61