Loading...
Searching...
No Matches
coap.h
1/*
2 * Copyright (C) 2019 Kaspar Schleiser <kaspar@schleiser.de>
3 * 2019 Inria
4 * 2019 Freie Universität Berlin
5 *
6 * This file is subject to the terms and conditions of the GNU Lesser
7 * General Public License v2.1. See the file LICENSE in the top level
8 * directory for more details.
9 */
10
25#ifndef SUIT_TRANSPORT_COAP_H
26#define SUIT_TRANSPORT_COAP_H
27
28#include "net/nanocoap.h"
29#include "suit/transport/worker.h"
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35/*
36 * Dear Reviewer,
37 *
38 * At the time of PR'ing this code, there was a pile of CoAP PR's waiting for
39 * reviews. Some of that functionality is needed in one way or another for
40 * SUIT. In order to not block software updates with CoAP refactoring, some of
41 * the work-in-progress code has been copied here. We expect this to be
42 * removed as soon as CoAP in master provides similar functionality.
43 *
44 * As this is internal code that will go soon, I exclude this from Doxygen.
45 *
46 * Kaspar (July 2019)
47 */
48#ifndef DOXYGEN
49
53#ifndef CONFIG_SUIT_COAP_BLOCKSIZE
54#define CONFIG_SUIT_COAP_BLOCKSIZE CONFIG_NANOCOAP_BLOCKSIZE_DEFAULT
55#endif
56
66static inline void suit_coap_trigger(const uint8_t *url, size_t len)
67{
68 suit_worker_trigger((const char *)url, len);
69}
70
71#endif /* DOXYGEN */
72
73#ifdef __cplusplus
74}
75#endif
76
77#endif /* SUIT_TRANSPORT_COAP_H */
void suit_worker_trigger(const char *url, size_t len)
Trigger a SUIT update via a worker thread.
nanocoap API