nRF Connect SDK API 3.3.99
Loading...
Searching...
No Matches
config_channel_transport.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2020 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
7#ifndef _CONFIG_CHANNEL_TRANSPORT_H_
8#define _CONFIG_CHANNEL_TRANSPORT_H_
9
17#include "config_event.h"
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
33int config_channel_report_parse(const uint8_t *buffer, size_t length,
34 struct config_event *event);
35
47int config_channel_report_fill(uint8_t *buffer, const size_t length,
48 const struct config_event *event);
49
57
67
73
86 uint8_t *buffer, size_t length);
87
100 const uint8_t *buffer, size_t length);
101
116int config_channel_transport_get_disabled(uint8_t *buffer, size_t length);
117
128 struct config_event *event);
129
136
137#ifdef __cplusplus
138}
139#endif
140
145#endif /*_CONFIG_CHANNEL_TRANSPORT_H_ */
int config_channel_transport_get_disabled(uint8_t *buffer, size_t length)
Handle a get operation and inform that the transport is disabled.
void config_channel_transport_init(struct config_channel_transport *transport)
Initialize the configuration channel transport instance.
int config_channel_transport_set(struct config_channel_transport *transport, const uint8_t *buffer, size_t length)
Handle a set operation on the configuration channel.
int config_channel_report_parse(const uint8_t *buffer, size_t length, struct config_event *event)
Parse the configuration channel report.
config_channel_transport_state
Config channel transport states.
Definition config_channel_transport.h:51
@ CONFIG_CHANNEL_TRANSPORT_WAIT_RSP
Definition config_channel_transport.h:54
@ CONFIG_CHANNEL_TRANSPORT_IDLE
Definition config_channel_transport.h:53
@ CONFIG_CHANNEL_TRANSPORT_DISABLED
Definition config_channel_transport.h:52
@ CONFIG_CHANNEL_TRANSPORT_RSP_READY
Definition config_channel_transport.h:55
int config_channel_report_fill(uint8_t *buffer, const size_t length, const struct config_event *event)
Fill the configuration channel report with values from a provided event.
int config_channel_transport_get(struct config_channel_transport *transport, uint8_t *buffer, size_t length)
Handle a get operation on the configuration channel.
bool config_channel_transport_rsp_receive(struct config_channel_transport *transport, struct config_event *event)
Handle the response received from higher layer.
void config_channel_transport_disconnect(struct config_channel_transport *transport)
Handle the configuration channel transport disconnection.
#define REPORT_SIZE_USER_CONFIG
Definition hid_report_user_config.h:14
struct k_work_delayable timeout
Definition config_channel_transport.h:60
uint8_t data[REPORT_SIZE_USER_CONFIG]
Definition config_channel_transport.h:63
size_t data_len
Definition config_channel_transport.h:61
uint16_t transport_id
Definition config_channel_transport.h:62
enum config_channel_transport_state state
Definition config_channel_transport.h:65
Configuration channel transport.
Definition config_channel_transport.h:59
Configuration channel event. Used to forward configuration channel request/response.
Definition config_event.h:84