nRF Connect SDK API 3.4.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/* %FEACONF feature IDs. */
34
35/* Initialize the modem firmware type (read it from the modem). */
36void mfw_type_init(void);
37
38/* Get the modem firmware type. */
40
41/* Enable or disable a modem feature using AT%FEACONF. */
42int feaconf_write(enum feaconf_feat feature, bool enable);
43
44/* Converts integer as string to integer type. */
45int string_to_int(const char *str_buf, int base, int *output);
46
47/* Converts integer on string format to integer type. */
48int string_param_to_int(struct at_parser *parser, size_t idx, int *output, int base);
49
50/* Converts PLMN string to integer type MCC and MNC. */
51int plmn_param_string_to_mcc_mnc(struct at_parser *parser, size_t idx, int *mcc, int *mnc);
52
53#ifdef __cplusplus
54}
55#endif
56
57#endif /* HELPERS_H__ */
enum mfw_type mfw_type_get(void)
int string_to_int(const char *str_buf, int base, int *output)
feaconf_feat
Definition helpers.h:28
@ FEACONF_FEAT_PROPRIETARY_PSM
Definition helpers.h:29
@ FEACONF_FEAT_UICC_DEACTIVATION_NO_CELLS
Definition helpers.h:32
@ FEACONF_FEAT_PLMN_SELECTION_OPTIMIZATION
Definition helpers.h:30
@ FEACONF_FEAT_DISABLE_PAGING_NO_SERVICE
Definition helpers.h:31
mfw_type
Definition helpers.h:20
@ MFW_TYPE_UNKNOWN
Definition helpers.h:21
@ MFW_TYPE_NRF92
Definition helpers.h:24
@ MFW_TYPE_NRF91X1
Definition helpers.h:22
@ MFW_TYPE_NRF9151_NTN
Definition helpers.h:23
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)
int feaconf_write(enum feaconf_feat feature, bool enable)
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