nRF Connect SDK API
3.4.99
Toggle main menu visibility
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
17
extern
"C"
{
18
#endif
19
20
enum
mfw_type
{
21
MFW_TYPE_UNKNOWN
,
22
MFW_TYPE_NRF91X1
,
23
MFW_TYPE_NRF9151_NTN
,
24
MFW_TYPE_NRF92
25
};
26
27
/* %FEACONF feature IDs. */
28
enum
feaconf_feat
{
29
FEACONF_FEAT_PROPRIETARY_PSM
= 0,
30
FEACONF_FEAT_PLMN_SELECTION_OPTIMIZATION
= 3,
31
FEACONF_FEAT_DISABLE_PAGING_NO_SERVICE
= 4,
32
FEACONF_FEAT_UICC_DEACTIVATION_NO_CELLS
= 5,
33
};
34
35
/* Initialize the modem firmware type (read it from the modem). */
36
void
mfw_type_init
(
void
);
37
38
/* Get the modem firmware type. */
39
enum
mfw_type
mfw_type_get
(
void
);
40
41
/* Enable or disable a modem feature using AT%FEACONF. */
42
int
feaconf_write
(
enum
feaconf_feat
feature,
bool
enable);
43
44
/* Converts integer as string to integer type. */
45
int
string_to_int
(
const
char
*str_buf,
int
base,
int
*output);
46
47
/* Converts integer on string format to integer type. */
48
int
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. */
51
int
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__ */
at_parser.h
mfw_type_get
enum mfw_type mfw_type_get(void)
string_to_int
int string_to_int(const char *str_buf, int base, int *output)
feaconf_feat
feaconf_feat
Definition
helpers.h:28
FEACONF_FEAT_PROPRIETARY_PSM
@ FEACONF_FEAT_PROPRIETARY_PSM
Definition
helpers.h:29
FEACONF_FEAT_UICC_DEACTIVATION_NO_CELLS
@ FEACONF_FEAT_UICC_DEACTIVATION_NO_CELLS
Definition
helpers.h:32
FEACONF_FEAT_PLMN_SELECTION_OPTIMIZATION
@ FEACONF_FEAT_PLMN_SELECTION_OPTIMIZATION
Definition
helpers.h:30
FEACONF_FEAT_DISABLE_PAGING_NO_SERVICE
@ FEACONF_FEAT_DISABLE_PAGING_NO_SERVICE
Definition
helpers.h:31
mfw_type
mfw_type
Definition
helpers.h:20
MFW_TYPE_UNKNOWN
@ MFW_TYPE_UNKNOWN
Definition
helpers.h:21
MFW_TYPE_NRF92
@ MFW_TYPE_NRF92
Definition
helpers.h:24
MFW_TYPE_NRF91X1
@ MFW_TYPE_NRF91X1
Definition
helpers.h:22
MFW_TYPE_NRF9151_NTN
@ MFW_TYPE_NRF9151_NTN
Definition
helpers.h:23
string_param_to_int
int string_param_to_int(struct at_parser *parser, size_t idx, int *output, int base)
plmn_param_string_to_mcc_mnc
int plmn_param_string_to_mcc_mnc(struct at_parser *parser, size_t idx, int *mcc, int *mnc)
feaconf_write
int feaconf_write(enum feaconf_feat feature, bool enable)
mfw_type_init
void mfw_type_init(void)
at_parser
AT parser.
Definition
at_parser.h:45
parser
Set of parser variables needed for parser framework to operate.
Definition
parser.h:55
lib
lte_link_control
include
common
helpers.h
Generated on
for nRF Connect SDK API by
1.17.0