Loading...
Searching...
No Matches
coap.h
1/*
2 * SPDX-FileCopyrightText: 2019 Kaspar Schleiser <kaspar@schleiser.de>
3 * SPDX-FileCopyrightText: 2019 Inria
4 * SPDX-FileCopyrightText: 2019 Freie Universität Berlin
5 * SPDX-License-Identifier: LGPL-2.1-only
6 */
7
8#pragma once
9
23
24#include "net/nanocoap.h"
25#include "suit/transport/worker.h"
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
31/*
32 * Dear Reviewer,
33 *
34 * At the time of PR'ing this code, there was a pile of CoAP PR's waiting for
35 * reviews. Some of that functionality is needed in one way or another for
36 * SUIT. In order to not block software updates with CoAP refactoring, some of
37 * the work-in-progress code has been copied here. We expect this to be
38 * removed as soon as CoAP in master provides similar functionality.
39 *
40 * As this is internal code that will go soon, I exclude this from Doxygen.
41 *
42 * Kaspar (July 2019)
43 */
44#ifndef DOXYGEN
45
49#ifndef CONFIG_SUIT_COAP_BLOCKSIZE
50#define CONFIG_SUIT_COAP_BLOCKSIZE CONFIG_NANOCOAP_BLOCKSIZE_DEFAULT
51#endif
52
62static inline void suit_coap_trigger(const uint8_t *url, size_t len)
63{
64 suit_worker_trigger((const char *)url, len);
65}
66
67#endif /* DOXYGEN */
68
69#ifdef __cplusplus
70}
71#endif
72
bool suit_worker_trigger(const char *url, size_t len)
Trigger a SUIT update via a worker thread.
nanocoap API