Skip to content

Commit

Permalink
net: lib: nrf_cloud_coap: Simplify headers
Browse files Browse the repository at this point in the history
The multi service sample fails to build with
the logging overlay due to a recent change
to the nrf_cloud_coap.h header.

Move conflicting definitions from nrf_cloud_coap_transport.h to
nrf_cloud_coap.h.

Jira: IRIS-9135

Signed-off-by: Pete Skeggs <peter.skeggs@nordicsemi.no>
  • Loading branch information
plskeggs authored and anangl committed Jun 11, 2024
1 parent a2f15dd commit 681757c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
11 changes: 11 additions & 0 deletions include/net/nrf_cloud_coap.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,18 @@ extern "C" {
#include <net/nrf_cloud_pgps.h>
#endif
#include <net/nrf_cloud_codec.h>
#if defined(CONFIG_NRF_CLOUD_COAP)
#include <zephyr/net/coap.h>
#include <zephyr/net/coap_client.h>
#else
/* Work around missing Kconfigs upstream in coap_client.h */
#define coap_client_response_cb_t void *
enum coap_content_format {
dummy
};
struct coap_client {};
struct coap_client_option {};
#endif

/**
* @defgroup nrf_cloud_coap nRF CoAP API
Expand Down
12 changes: 1 addition & 11 deletions subsys/net/lib/nrf_cloud/coap/include/nrf_cloud_coap_transport.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,7 @@ extern "C" {
#if defined(CONFIG_NRF_CLOUD_PGPS)
#include <net/nrf_cloud_pgps.h>
#endif
#if defined(CONFIG_NRF_CLOUD_COAP)
#include <zephyr/net/coap_client.h>
#else
/* Work around missing Kconfigs upstream in coap_client.h */
#define coap_client_response_cb_t void *
enum coap_content_format {
dummy
};
struct coap_client {};
struct coap_client_option {};
#endif
#include <net/nrf_cloud_coap.h>

struct nrf_cloud_coap_client {
struct k_mutex mutex;
Expand Down

0 comments on commit 681757c

Please sign in to comment.