nRF Connect SDK API 3.3.99
Loading...
Searching...
No Matches
helpers.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
7#ifndef HELPERS_H__
8#define HELPERS_H__
9
10#include <string.h>
11#include <stdio.h>
12#include <zephyr/kernel.h>
13#include <zephyr/types.h>
14#include <modem/at_parser.h>
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
26
27/* Initialize the modem firmware type (read it from the modem). */
28void mfw_type_init(void);
29
30/* Get the modem firmware type. */
32
33/* Converts integer as string to integer type. */
34int string_to_int(const char *str_buf, int base, int *output);
35
36/* Converts integer on string format to integer type. */
37int string_param_to_int(struct at_parser *parser, size_t idx, int *output, int base);
38
39/* Converts PLMN string to integer type MCC and MNC. */
40int plmn_param_string_to_mcc_mnc(struct at_parser *parser, size_t idx, int *mcc, int *mnc);
41
42#ifdef __cplusplus
43}
44#endif
45
46#endif /* HELPERS_H__ */
enum mfw_type mfw_type_get(void)
int string_to_int(const char *str_buf, int base, int *output)
mfw_type
Definition helpers.h:20
@ MFW_TYPE_UNKNOWN
Definition helpers.h:21
@ MFW_TYPE_NRF91X1
Definition helpers.h:23
@ MFW_TYPE_NRF9151_NTN
Definition helpers.h:24
@ MFW_TYPE_NRF9160
Definition helpers.h:22
int string_param_to_int(struct at_parser *parser, size_t idx, int *output, int base)
int plmn_param_string_to_mcc_mnc(struct at_parser *parser, size_t idx, int *mcc, int *mnc)
void mfw_type_init(void)
AT parser.
Definition at_parser.h:45
Set of parser variables needed for parser framework to operate.
Definition parser.h:55