Skip to content

Commit

Permalink
applications: nrf_desktop: fix c++ compatibility in util headers
Browse files Browse the repository at this point in the history
Make util headers includable from a c++ code.

Signed-off-by: Pawel Dunaj <[email protected]>
  • Loading branch information
pdunaj committed Jan 8, 2025
1 parent 1133ff3 commit 1d1cc00
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
8 changes: 8 additions & 0 deletions applications/nrf_desktop/src/util/config_channel_transport.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@

#include "config_event.h"

#ifdef __cplusplus
extern "C" {
#endif

/**
* @brief Parse the configuration channel report.
*
Expand Down Expand Up @@ -130,6 +134,10 @@ bool config_channel_transport_rsp_receive(struct config_channel_transport *trans
*/
void config_channel_transport_disconnect(struct config_channel_transport *transport);

#ifdef __cplusplus
}
#endif

/**
* @}
*/
Expand Down
8 changes: 8 additions & 0 deletions applications/nrf_desktop/src/util/dfu_lock.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
* @{
*/

#ifdef __cplusplus
extern "C" {
#endif

/** @brief DFU lock owner descriptor. */
struct dfu_lock_owner {
/** Owner name. */
Expand Down Expand Up @@ -69,6 +73,10 @@ int dfu_lock_claim(const struct dfu_lock_owner *new_owner);
*/
int dfu_lock_release(const struct dfu_lock_owner *owner);

#ifdef __cplusplus
}
#endif

/**
* @}
*/
Expand Down
8 changes: 8 additions & 0 deletions applications/nrf_desktop/src/util/hwid.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,16 @@
#ifndef _HWID_H_
#define _HWID_H_

#ifdef __cplusplus
extern "C" {
#endif

#define HWID_LEN 8

void hwid_get(uint8_t *buf, size_t buf_size);

#ifdef __cplusplus
}
#endif

#endif /* _HWID_H_ */

0 comments on commit 1d1cc00

Please sign in to comment.