7#ifndef ZEPHYR_INCLUDE_MGMT_SERIAL_H_
8#define ZEPHYR_INCLUDE_MGMT_SERIAL_H_
16#define MCUMGR_SERIAL_HDR_PKT 0x0609
17#define MCUMGR_SERIAL_HDR_FRAG 0x0414
18#define MCUMGR_SERIAL_MAX_FRAME 127
20#define MCUMGR_SERIAL_HDR_PKT_1 (MCUMGR_SERIAL_HDR_PKT >> 8)
21#define MCUMGR_SERIAL_HDR_PKT_2 (MCUMGR_SERIAL_HDR_PKT & 0xff)
22#define MCUMGR_SERIAL_HDR_FRAG_1 (MCUMGR_SERIAL_HDR_FRAG >> 8)
23#define MCUMGR_SERIAL_HDR_FRAG_2 (MCUMGR_SERIAL_HDR_FRAG & 0xff)
69 const uint8_t *frag,
int frag_len);
struct net_buf * mcumgr_serial_process_frag(struct mcumgr_serial_rx_ctxt *rx_ctxt, const uint8_t *frag, int frag_len)
Processes an mcumgr request fragment received over a serial transport.
int(* mcumgr_serial_tx_cb)(const void *data, int len)
Transmits a chunk of raw response data.
Definition: serial.h:46
int mcumgr_serial_tx_pkt(const uint8_t *data, int len, mcumgr_serial_tx_cb cb)
Encodes and transmits an mcumgr packet over serial.
__UINT8_TYPE__ uint8_t
Definition: stdint.h:88
__UINT16_TYPE__ uint16_t
Definition: stdint.h:89
Maintains state for an incoming mcumgr request packet.
Definition: serial.h:28
uint16_t pkt_len
Definition: serial.h:35
struct net_buf * nb
Definition: serial.h:32
Network buffer representation.
Definition: buf.h:1004
uint8_t * data
Pointer to the start of data in the buffer.
Definition: buf.h:1030
uint16_t len
Length of the data behind the data pointer.
Definition: buf.h:1033