nRF Connect SDK API
0.1.0
Loading...
Searching...
No Matches
at_cmd_custom.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2022 Nordic Semiconductor ASA
3
*
4
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5
*/
6
7
#ifndef AT_CMD_CUSTOM_H_
8
#define AT_CMD_CUSTOM_H_
9
10
#ifdef __cplusplus
11
extern
"C"
{
12
#endif
13
26
#include <stddef.h>
27
#include <zephyr/kernel.h>
28
#include <zephyr/sys/util_macro.h>
29
#include <zephyr/toolchain.h>
30
#include <nrf_modem_at.h>
31
48
int
at_cmd_custom_respond
(
char
*buf,
size_t
buf_size,
49
const
char
*response, ...);
50
58
#define AT_CMD_CUSTOM(entry, _filter, _callback) \
59
static int _callback(char *buf, size_t len, char *at_cmd); \
60
static STRUCT_SECTION_ITERABLE(nrf_modem_at_cmd_custom, entry) = { \
61
.cmd = _filter, \
62
.callback = _callback, \
63
.cmd_strlen = sizeof(_filter) - sizeof(char) \
64
}
65
68
#ifdef __cplusplus
69
}
70
#endif
71
72
#endif
/* AT_CMD_CUSTOM_H_ */
at_cmd_custom_respond
int at_cmd_custom_respond(char *buf, size_t buf_size, const char *response,...)
Fill response buffer without overflowing the buffer.
include
modem
at_cmd_custom.h
Generated on Thu Sep 26 2024 10:53:16 for nRF Connect SDK API by
1.9.6