Zephyr API
4.4.99
A Scalable Open Source RTOS
Toggle main menu visibility
Loading...
Searching...
No Matches
hdlc_rcp_if.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2024, NXP
3
*
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
7
#ifndef ZEPHYR_INCLUDE_NET_HDLC_RCP_IF_HDLC_RCP_IF_H_
8
#define ZEPHYR_INCLUDE_NET_HDLC_RCP_IF_HDLC_RCP_IF_H_
9
16
17
#include <
zephyr/sys/util.h
>
18
#include <
zephyr/net/net_if.h
>
19
20
#ifdef __cplusplus
21
extern
"C"
{
22
#endif
23
29
typedef
void (*
hdlc_rx_callback_t
)(
const
uint8_t
*data,
uint16_t
len,
void
*param);
30
32
struct
hdlc_api
{
36
struct
net_if_api
iface_api
;
37
47
int (*
register_rx_cb
)(
hdlc_rx_callback_t
hdlc_rx_callback,
void
*param);
48
60
int (*
send
)(
const
uint8_t
*frame,
uint16_t
length);
61
70
int (*
deinit
)(void);
71
81
int (*
deferred_init
)(void);
82
};
83
84
/* Make sure that the interface API is properly setup inside
85
* HDLC interface API struct (it is the first one).
86
*/
87
BUILD_ASSERT(offsetof(
struct
hdlc_api
, iface_api) == 0);
88
89
#ifdef __cplusplus
90
}
91
#endif
92
93
#endif
/* ZEPHYR_INCLUDE_NET_HDLC_RCP_IF_HDLC_RCP_IF_H_ */
hdlc_rx_callback_t
void(* hdlc_rx_callback_t)(const uint8_t *data, uint16_t len, void *param)
OT RCP HDLC RX callback function.
Definition
hdlc_rcp_if.h:29
net_if.h
Public API for network interface.
uint8_t
__UINT8_TYPE__ uint8_t
Definition
stdint.h:88
uint16_t
__UINT16_TYPE__ uint16_t
Definition
stdint.h:89
hdlc_api
HDLC interface configuration data.
Definition
hdlc_rcp_if.h:32
hdlc_api::register_rx_cb
int(* register_rx_cb)(hdlc_rx_callback_t hdlc_rx_callback, void *param)
Register the Spinel HDLC RX callback.
Definition
hdlc_rcp_if.h:47
hdlc_api::deinit
int(* deinit)(void)
Deinitialize the device.
Definition
hdlc_rcp_if.h:70
hdlc_api::send
int(* send)(const uint8_t *frame, uint16_t length)
Transmit a HDLC frame.
Definition
hdlc_rcp_if.h:60
hdlc_api::iface_api
struct net_if_api iface_api
HDLC interface API.
Definition
hdlc_rcp_if.h:36
hdlc_api::deferred_init
int(* deferred_init)(void)
Optional: complete the RCP interface initialization in deferred init mode.
Definition
hdlc_rcp_if.h:81
util.h
Misc utilities.
zephyr
net
hdlc_rcp_if
hdlc_rcp_if.h
Generated on
for Zephyr API by
1.17.0