nRF Connect SDK API 0.1.0
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
29int config_channel_report_parse(const uint8_t *buffer, size_t length,
30 struct config_event *event);
31
43int config_channel_report_fill(uint8_t *buffer, const size_t length,
44 const struct config_event *event);
45
52};
53
56 struct k_work_delayable timeout;
57 size_t data_len;
58 uint16_t transport_id;
60
62};
63
69
82 uint8_t *buffer, size_t length);
83
96 const uint8_t *buffer, size_t length);
97
112int config_channel_transport_get_disabled(uint8_t *buffer, size_t length);
113
124 struct config_event *event);
125
132
137#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:47
@ CONFIG_CHANNEL_TRANSPORT_WAIT_RSP
Definition: config_channel_transport.h:50
@ CONFIG_CHANNEL_TRANSPORT_IDLE
Definition: config_channel_transport.h:49
@ CONFIG_CHANNEL_TRANSPORT_DISABLED
Definition: config_channel_transport.h:48
@ CONFIG_CHANNEL_TRANSPORT_RSP_READY
Definition: config_channel_transport.h:51
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:56
uint8_t data[REPORT_SIZE_USER_CONFIG]
Definition: config_channel_transport.h:59
size_t data_len
Definition: config_channel_transport.h:57
uint16_t transport_id
Definition: config_channel_transport.h:58
enum config_channel_transport_state state
Definition: config_channel_transport.h:61
Configuration channel transport.
Definition: config_channel_transport.h:55
Configuration channel event. Used to forward configuration channel request/response.
Definition: config_event.h:84