Add #ifdef __cplusplus guards

This commit adds them to almost every header. There are a few that don't have 
any normal header include guards because they don't define anything.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/d69b0798
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/d69b0798
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/d69b0798

Branch: refs/heads/develop
Commit: d69b07986397dfc841ee6618301af5ba08ddc058
Parents: 6ae852c
Author: Tim Hutt <tdh...@gmail.com>
Authored: Sat Oct 1 15:25:27 2016 +0100
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Mon Oct 3 13:28:15 2016 -0700

----------------------------------------------------------------------
 apps/blecent/src/blecent.h                                   | 8 ++++++++
 apps/bleprph/src/bleprph.h                                   | 8 ++++++++
 apps/bletest/src/bletest_priv.h                              | 8 ++++++++
 apps/bletiny/src/bletiny.h                                   | 8 ++++++++
 boot/boot_serial/include/boot_serial/boot_serial.h           | 8 ++++++++
 boot/boot_serial/src/boot_serial_priv.h                      | 8 ++++++++
 boot/bootutil/include/bootutil/bootutil_misc.h               | 8 ++++++++
 boot/bootutil/include/bootutil/bootutil_test.h               | 8 ++++++++
 boot/bootutil/include/bootutil/image.h                       | 8 ++++++++
 boot/bootutil/include/bootutil/loader.h                      | 8 ++++++++
 boot/bootutil/include/bootutil/sign_key.h                    | 8 ++++++++
 boot/bootutil/src/bootutil_priv.h                            | 8 ++++++++
 boot/split/include/split/split.h                             | 8 ++++++++
 boot/split/include/split/split_priv.h                        | 8 ++++++++
 crypto/mbedtls/include/mbedtls/bn_mul.h                      | 8 ++++++++
 crypto/mbedtls/include/mbedtls/check_config.h                | 8 ++++++++
 crypto/mbedtls/include/mbedtls/compat-1.3.h                  | 8 ++++++++
 crypto/mbedtls/include/mbedtls/config.h                      | 8 ++++++++
 crypto/mbedtls/include/mbedtls/config_mynewt.h               | 8 ++++++++
 crypto/mbedtls/include/mbedtls/mbedtls_test.h                | 8 ++++++++
 crypto/mbedtls/include/mbedtls/pk_internal.h                 | 8 ++++++++
 encoding/base64/include/base64/base64.h                      | 8 ++++++++
 encoding/base64/include/base64/hex.h                         | 8 ++++++++
 encoding/base64/test/src/encoding_test_priv.h                | 8 ++++++++
 encoding/json/include/json/json.h                            | 8 ++++++++
 encoding/json/test/src/test_json.h                           | 8 ++++++++
 encoding/tinycbor/include/tinycbor/cborconstants_p.h         | 8 ++++++++
 encoding/tinycbor/include/tinycbor/compilersupport_p.h       | 8 ++++++++
 encoding/tinycbor/include/tinycbor/math_support_p.h          | 8 ++++++++
 fs/fcb/include/fcb/fcb.h                                     | 8 ++++++++
 fs/fcb/src/fcb_priv.h                                        | 8 ++++++++
 fs/fs/include/fs/fs.h                                        | 8 ++++++++
 fs/fs/include/fs/fs_if.h                                     | 8 ++++++++
 fs/fs/include/fs/fsutil.h                                    | 8 ++++++++
 fs/fs/src/fs_priv.h                                          | 8 ++++++++
 fs/nffs/include/nffs/nffs.h                                  | 8 ++++++++
 fs/nffs/include/nffs/nffs_test.h                             | 8 ++++++++
 fs/nffs/src/nffs_priv.h                                      | 8 ++++++++
 fs/nffs/test/src/arch/sim/nffs_test_priv.h                   | 8 ++++++++
 hw/bsp/arduino_primo_nrf52/include/bsp/nrf_drv_config.h      | 8 ++++++++
 hw/bsp/bmd300eval/include/bsp/nrf_drv_config.h               | 8 ++++++++
 hw/bsp/native/include/bsp/bsp_sysid.h                        | 8 ++++++++
 hw/bsp/nrf51-arduino_101/include/bsp/nrf_drv_config.h        | 8 ++++++++
 hw/bsp/nrf51-blenano/include/bsp/nrf_drv_config.h            | 8 ++++++++
 hw/bsp/nrf51dk-16kbram/include/bsp/bsp_sysid.h               | 3 ++-
 hw/bsp/nrf51dk-16kbram/include/bsp/nrf_drv_config.h          | 8 ++++++++
 hw/bsp/nrf51dk/include/bsp/nrf_drv_config.h                  | 8 ++++++++
 hw/bsp/nrf52dk/include/bsp/nrf_drv_config.h                  | 8 ++++++++
 hw/cmsis-core/src/ext/core_caFunc.h                          | 8 ++++++++
 hw/cmsis-core/src/ext/core_caInstr.h                         | 8 ++++++++
 hw/cmsis-core/src/ext/core_cmFunc.h                          | 8 ++++++++
 hw/cmsis-core/src/ext/core_cmInstr.h                         | 8 ++++++++
 hw/drivers/adc/adc_nrf51/include/adc_nrf51/adc_nrf51.h       | 8 ++++++++
 hw/drivers/adc/adc_nrf52/include/adc_nrf52/adc_nrf52.h       | 8 ++++++++
 hw/drivers/adc/adc_stm32f4/include/adc_stm32f4/adc_stm32f4.h | 8 ++++++++
 hw/drivers/adc/include/adc/adc.h                             | 8 ++++++++
 hw/drivers/nimble/native/include/ble/xcvr.h                  | 8 ++++++++
 hw/drivers/nimble/nrf51/include/ble/xcvr.h                   | 8 ++++++++
 hw/drivers/nimble/nrf52/include/ble/xcvr.h                   | 8 ++++++++
 hw/drivers/uart/include/uart/uart.h                          | 8 ++++++++
 .../uart/uart_bitbang/include/uart_bitbang/uart_bitbang.h    | 8 ++++++++
 hw/drivers/uart/uart_hal/include/uart_hal/uart_hal.h         | 8 ++++++++
 hw/hal/include/hal/hal_watchdog.h                            | 8 ++++++++
 hw/mcu/native/include/mcu/mcu_sim.h                          | 8 ++++++++
 hw/mcu/native/include/mcu/native_bsp.h                       | 8 ++++++++
 hw/mcu/nordic/nrf51xxx/include/mcu/cortex_m0.h               | 8 ++++++++
 hw/mcu/nordic/nrf52xxx/include/mcu/cortex_m4.h               | 8 ++++++++
 .../components/device/compiler_abstraction.h                 | 8 ++++++++
 .../src/ext/nRF5_SDK_11.0.0_89a8197/components/device/nrf.h  | 8 ++++++++
 .../components/device/nrf51_bitfields.h                      | 8 ++++++++
 .../components/device/nrf51_deprecated.h                     | 8 ++++++++
 .../components/device/nrf51_to_nrf52.h                       | 8 ++++++++
 .../components/device/nrf52_bitfields.h                      | 8 ++++++++
 .../components/device/nrf52_name_change.h                    | 8 ++++++++
 .../components/drivers_nrf/adc/nrf_drv_adc.h                 | 8 ++++++++
 .../components/drivers_nrf/ble_flash/ble_flash.h             | 8 ++++++++
 .../components/drivers_nrf/clock/nrf_drv_clock.h             | 8 ++++++++
 .../components/drivers_nrf/common/nrf_drv_common.h           | 8 ++++++++
 .../components/drivers_nrf/comp/nrf_drv_comp.h               | 8 ++++++++
 .../components/drivers_nrf/config/nrf_drv_config.h           | 8 ++++++++
 .../drivers_nrf/config/nrf_drv_config_validation.h           | 8 ++++++++
 .../components/drivers_nrf/delay/nrf_delay.h                 | 8 ++++++++
 .../components/drivers_nrf/gpiote/nrf_drv_gpiote.h           | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_adc.h                     | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_clock.h                   | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_comp.h                    | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_ecb.h                     | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_egu.h                     | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_gpio.h                    | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_gpiote.h                  | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_i2s.h                     | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_lpcomp.h                  | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_nvmc.h                    | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_pdm.h                     | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_ppi.h                     | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_pwm.h                     | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_qdec.h                    | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_rng.h                     | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_rtc.h                     | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_saadc.h                   | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_spi.h                     | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_spim.h                    | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_spis.h                    | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_temp.h                    | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_timer.h                   | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_twi.h                     | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_twim.h                    | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_twis.h                    | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_uart.h                    | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_uarte.h                   | 8 ++++++++
 .../components/drivers_nrf/hal/nrf_wdt.h                     | 8 ++++++++
 .../components/drivers_nrf/i2s/nrf_drv_i2s.h                 | 8 ++++++++
 .../components/drivers_nrf/lpcomp/nrf_drv_lpcomp.h           | 8 ++++++++
 .../components/drivers_nrf/nrf_soc_nosd/nrf_error.h          | 8 ++++++++
 .../components/drivers_nrf/nrf_soc_nosd/nrf_nvic.h           | 8 ++++++++
 .../components/drivers_nrf/nrf_soc_nosd/nrf_soc.h            | 8 ++++++++
 .../components/drivers_nrf/pdm/nrf_drv_pdm.h                 | 8 ++++++++
 .../components/drivers_nrf/ppi/nrf_drv_ppi.h                 | 8 ++++++++
 .../drivers_nrf/pstorage/config/pstorage_platform.h          | 8 ++++++++
 .../components/drivers_nrf/pstorage/pstorage.h               | 8 ++++++++
 .../components/drivers_nrf/pwm/nrf_drv_pwm.h                 | 8 ++++++++
 .../components/drivers_nrf/qdec/nrf_drv_qdec.h               | 8 ++++++++
 .../components/drivers_nrf/radio_config/radio_config.h       | 8 ++++++++
 .../components/drivers_nrf/rng/nrf_drv_rng.h                 | 8 ++++++++
 .../components/drivers_nrf/rtc/nrf_drv_rtc.h                 | 8 ++++++++
 .../components/drivers_nrf/saadc/nrf_drv_saadc.h             | 8 ++++++++
 .../components/drivers_nrf/sdio/config/sdio_config.h         | 8 ++++++++
 .../components/drivers_nrf/sdio/sdio.h                       | 8 ++++++++
 .../components/drivers_nrf/spi_master/nrf_drv_spi.h          | 8 ++++++++
 .../components/drivers_nrf/spi_master/spi_5W_master.h        | 8 ++++++++
 .../components/drivers_nrf/spi_slave/nrf_drv_spis.h          | 8 ++++++++
 .../components/drivers_nrf/swi/nrf_drv_swi.h                 | 8 ++++++++
 .../components/drivers_nrf/timer/nrf_drv_timer.h             | 8 ++++++++
 .../twi_master/deprecated/config/twi_master_config.h         | 8 ++++++++
 .../drivers_nrf/twi_master/deprecated/twi_master.h           | 8 ++++++++
 .../components/drivers_nrf/twi_master/nrf_drv_twi.h          | 8 ++++++++
 .../components/drivers_nrf/twis_slave/nrf_drv_twis.h         | 8 ++++++++
 .../components/drivers_nrf/uart/nrf_drv_uart.h               | 8 ++++++++
 .../components/drivers_nrf/wdt/nrf_drv_wdt.h                 | 8 ++++++++
 .../components/libraries/ant_fs/antfs.h                      | 8 ++++++++
 .../components/libraries/ant_fs/crc.h                        | 8 ++++++++
 .../components/libraries/ant_fs/defines.h                    | 8 ++++++++
 .../bootloader_dfu/ble_transport/hci_mem_pool_internal.h     | 8 ++++++++
 .../components/libraries/bootloader_dfu/bootloader.h         | 8 ++++++++
 .../libraries/bootloader_dfu/bootloader_settings.h           | 8 ++++++++
 .../components/libraries/bootloader_dfu/bootloader_types.h   | 8 ++++++++
 .../components/libraries/bootloader_dfu/bootloader_util.h    | 8 ++++++++
 .../components/libraries/bootloader_dfu/dfu.h                | 8 ++++++++
 .../components/libraries/bootloader_dfu/dfu_app_handler.h    | 8 ++++++++
 .../components/libraries/bootloader_dfu/dfu_bank_internal.h  | 8 ++++++++
 .../components/libraries/bootloader_dfu/dfu_ble_svc.h        | 8 ++++++++
 .../libraries/bootloader_dfu/dfu_ble_svc_internal.h          | 8 ++++++++
 .../components/libraries/bootloader_dfu/dfu_init.h           | 8 ++++++++
 .../components/libraries/bootloader_dfu/dfu_transport.h      | 8 ++++++++
 .../components/libraries/bootloader_dfu/dfu_types.h          | 8 ++++++++
 .../libraries/bootloader_dfu/experimental/nrf_sec.h          | 8 ++++++++
 .../bootloader_dfu/hci_transport/hci_mem_pool_internal.h     | 8 ++++++++
 .../bootloader_dfu/hci_transport/hci_transport_config.h      | 8 ++++++++
 .../components/libraries/button/app_button.h                 | 8 ++++++++
 .../components/libraries/crc16/crc16.h                       | 8 ++++++++
 .../components/libraries/crc32/crc32.h                       | 8 ++++++++
 .../libraries/experimental_section_vars/section_vars.h       | 8 ++++++++
 .../components/libraries/fds/config/fds_config.h             | 8 ++++++++
 .../nRF5_SDK_11.0.0_89a8197/components/libraries/fds/fds.h   | 8 ++++++++
 .../components/libraries/fds/fds_internal_defs.h             | 8 ++++++++
 .../components/libraries/fifo/app_fifo.h                     | 8 ++++++++
 .../components/libraries/fstorage/config/fstorage_config.h   | 8 ++++++++
 .../components/libraries/fstorage/fstorage.h                 | 8 ++++++++
 .../components/libraries/fstorage/fstorage_internal_defs.h   | 8 ++++++++
 .../components/libraries/gpiote/app_gpiote.h                 | 8 ++++++++
 .../components/libraries/hardfault/hardfault.h               | 8 ++++++++
 .../components/libraries/hci/config/hci_mem_pool_internal.h  | 8 ++++++++
 .../components/libraries/hci/config/hci_transport_config.h   | 8 ++++++++
 .../components/libraries/hci/hci_mem_pool.h                  | 8 ++++++++
 .../components/libraries/hci/hci_slip.h                      | 8 ++++++++
 .../components/libraries/hci/hci_transport.h                 | 8 ++++++++
 .../components/libraries/ic_info/nrf_ic_info.h               | 8 ++++++++
 .../components/libraries/led_softblink/led_softblink.h       | 8 ++++++++
 .../components/libraries/low_power_pwm/low_power_pwm.h       | 8 ++++++++
 .../components/libraries/mailbox/app_mailbox.h               | 8 ++++++++
 .../components/libraries/mem_manager/mem_manager.h           | 8 ++++++++
 .../components/libraries/pwm/app_pwm.h                       | 8 ++++++++
 .../components/libraries/scheduler/app_scheduler.h           | 8 ++++++++
 .../components/libraries/sensorsim/sensorsim.h               | 8 ++++++++
 .../components/libraries/sha256/sha256.h                     | 8 ++++++++
 .../components/libraries/simple_timer/app_simple_timer.h     | 8 ++++++++
 .../nRF5_SDK_11.0.0_89a8197/components/libraries/slip/slip.h | 8 ++++++++
 .../components/libraries/timer/app_timer.h                   | 8 ++++++++
 .../components/libraries/timer/app_timer_appsh.h             | 8 ++++++++
 .../components/libraries/trace/app_trace.h                   | 8 ++++++++
 .../components/libraries/twi/app_twi.h                       | 8 ++++++++
 .../components/libraries/uart/app_uart.h                     | 8 ++++++++
 .../components/libraries/util/app_error.h                    | 8 ++++++++
 .../components/libraries/util/app_error_weak.h               | 8 ++++++++
 .../components/libraries/util/app_util.h                     | 8 ++++++++
 .../components/libraries/util/app_util_bds.h                 | 8 ++++++++
 .../components/libraries/util/app_util_platform.h            | 8 ++++++++
 .../components/libraries/util/common.h                       | 8 ++++++++
 .../components/libraries/util/nordic_common.h                | 8 ++++++++
 .../components/libraries/util/nrf_assert.h                   | 8 ++++++++
 .../components/libraries/util/nrf_log.h                      | 8 ++++++++
 .../components/libraries/util/sdk_common.h                   | 8 ++++++++
 .../components/libraries/util/sdk_errors.h                   | 8 ++++++++
 .../components/libraries/util/sdk_macros.h                   | 8 ++++++++
 .../components/libraries/util/sdk_mapped_flags.h             | 8 ++++++++
 .../components/libraries/util/sdk_os.h                       | 8 ++++++++
 .../components/libraries/util/sdk_resources.h                | 8 ++++++++
 .../serialization/application/codecs/common/ble_dtm_app.h    | 8 ++++++++
 .../application/codecs/common/conn_systemreset.h             | 8 ++++++++
 .../codecs/s130/serializers/app_ble_gap_sec_keys.h           | 8 ++++++++
 .../application/codecs/s130/serializers/app_ble_user_mem.h   | 8 ++++++++
 .../application/codecs/s130/serializers/ble_app.h            | 8 ++++++++
 .../application/codecs/s130/serializers/ble_evt_app.h        | 8 ++++++++
 .../application/codecs/s130/serializers/ble_gap_app.h        | 8 ++++++++
 .../application/codecs/s130/serializers/ble_gap_evt_app.h    | 8 ++++++++
 .../application/codecs/s130/serializers/ble_gattc_app.h      | 8 ++++++++
 .../application/codecs/s130/serializers/ble_gattc_evt_app.h  | 8 ++++++++
 .../application/codecs/s130/serializers/ble_gatts_app.h      | 8 ++++++++
 .../application/codecs/s130/serializers/ble_gatts_evt_app.h  | 8 ++++++++
 .../application/codecs/s130/serializers/ble_l2cap_app.h      | 8 ++++++++
 .../application/codecs/s130/serializers/ble_l2cap_evt_app.h  | 8 ++++++++
 .../application/codecs/s130/serializers/nrf_soc_app.h        | 8 ++++++++
 .../components/serialization/application/hal/ser_app_hal.h   | 8 ++++++++
 .../serialization/application/hal/ser_app_power_system_off.h | 8 ++++++++
 .../serialization/application/transport/ser_sd_transport.h   | 8 ++++++++
 .../application/transport/ser_softdevice_handler.h           | 8 ++++++++
 .../components/serialization/common/ble_serialization.h      | 8 ++++++++
 .../components/serialization/common/ser_config.h             | 8 ++++++++
 .../common/struct_ser/s130/ble_gattc_struct_serialization.h  | 8 ++++++++
 .../common/struct_ser/s130/ble_gatts_struct_serialization.h  | 8 ++++++++
 .../common/transport/debug/debug_hci_config_nrf6310.h        | 8 ++++++++
 .../serialization/common/transport/dtm_uart_params.h         | 8 ++++++++
 .../serialization/common/transport/ser_hal_transport.h       | 8 ++++++++
 .../common/transport/ser_phy/config/ser_config_5W_app.h      | 8 ++++++++
 .../transport/ser_phy/config/ser_phy_config_app_nrf51.h      | 8 ++++++++
 .../transport/ser_phy/config/ser_phy_config_conn_nrf51.h     | 8 ++++++++
 .../common/transport/ser_phy/config/ser_phy_debug_app.h      | 8 ++++++++
 .../common/transport/ser_phy/config/ser_phy_debug_conn.h     | 8 ++++++++
 .../serialization/common/transport/ser_phy/ser_phy.h         | 8 ++++++++
 .../serialization/common/transport/ser_phy/ser_phy_hci.h     | 8 ++++++++
 .../serialization/common/transport/ser_phy/spi_5W_master.h   | 8 ++++++++
 .../serialization/common/transport/ser_phy_debug_comm.h      | 8 ++++++++
 .../serialization/connectivity/codecs/common/ble_dtm_conn.h  | 8 ++++++++
 .../serialization/connectivity/codecs/common/conn_mw.h       | 8 ++++++++
 .../connectivity/codecs/s130/middleware/conn_mw.h            | 8 ++++++++
 .../connectivity/codecs/s130/middleware/conn_mw_ble.h        | 8 ++++++++
 .../connectivity/codecs/s130/middleware/conn_mw_ble_gap.h    | 8 ++++++++
 .../connectivity/codecs/s130/middleware/conn_mw_ble_gattc.h  | 8 ++++++++
 .../connectivity/codecs/s130/middleware/conn_mw_ble_gatts.h  | 8 ++++++++
 .../connectivity/codecs/s130/middleware/conn_mw_ble_l2cap.h  | 8 ++++++++
 .../connectivity/codecs/s130/middleware/conn_mw_nrf_soc.h    | 8 ++++++++
 .../connectivity/codecs/s130/serializers/ble_conn.h          | 8 ++++++++
 .../connectivity/codecs/s130/serializers/ble_evt_conn.h      | 8 ++++++++
 .../connectivity/codecs/s130/serializers/ble_gap_conn.h      | 8 ++++++++
 .../connectivity/codecs/s130/serializers/ble_gap_evt_conn.h  | 8 ++++++++
 .../connectivity/codecs/s130/serializers/ble_gattc_conn.h    | 8 ++++++++
 .../codecs/s130/serializers/ble_gattc_evt_conn.h             | 8 ++++++++
 .../connectivity/codecs/s130/serializers/ble_gatts_conn.h    | 8 ++++++++
 .../codecs/s130/serializers/ble_gatts_evt_conn.h             | 8 ++++++++
 .../connectivity/codecs/s130/serializers/ble_l2cap_conn.h    | 8 ++++++++
 .../codecs/s130/serializers/ble_l2cap_evt_conn.h             | 8 ++++++++
 .../codecs/s130/serializers/conn_ble_gap_sec_keys.h          | 8 ++++++++
 .../connectivity/codecs/s130/serializers/conn_ble_user_mem.h | 8 ++++++++
 .../connectivity/codecs/s130/serializers/nrf_soc_conn.h      | 8 ++++++++
 .../components/serialization/connectivity/hal/dtm_uart.h     | 8 ++++++++
 .../serialization/connectivity/pstorage_platform.h           | 8 ++++++++
 .../serialization/connectivity/ser_conn_cmd_decoder.h        | 8 ++++++++
 .../serialization/connectivity/ser_conn_dtm_cmd_decoder.h    | 8 ++++++++
 .../serialization/connectivity/ser_conn_event_encoder.h      | 8 ++++++++
 .../serialization/connectivity/ser_conn_handlers.h           | 8 ++++++++
 .../serialization/connectivity/ser_conn_pkt_decoder.h        | 8 ++++++++
 .../serialization/connectivity/ser_conn_reset_cmd_decoder.h  | 8 ++++++++
 .../components/toolchain/arm/uicr_config.h                   | 8 ++++++++
 hw/mcu/stm/stm32f4xx/include/mcu/cortex_m4.h                 | 8 ++++++++
 hw/mcu/stm/stm32f4xx/include/mcu/stm32f4_bsp.h               | 8 ++++++++
 hw/mcu/stm/stm32f4xx/include/mcu/stm32f4xx_conf.h            | 8 ++++++++
 hw/mcu/stm/stm32f4xx/include/mcu/stm32f4xx_mynewt_hal.h      | 8 ++++++++
 kernel/os/include/os/arch/cortex_m0/os/os_arch.h             | 8 ++++++++
 kernel/os/include/os/arch/cortex_m4/os/os_arch.h             | 8 ++++++++
 kernel/os/include/os/arch/sim/os/os_arch.h                   | 8 ++++++++
 kernel/os/include/os/endian.h                                | 8 ++++++++
 kernel/os/include/os/os.h                                    | 8 ++++++++
 kernel/os/include/os/os_callout.h                            | 8 ++++++++
 kernel/os/include/os/os_cfg.h                                | 8 ++++++++
 kernel/os/include/os/os_dev.h                                | 8 ++++++++
 kernel/os/include/os/os_eventq.h                             | 8 ++++++++
 kernel/os/include/os/os_heap.h                               | 8 ++++++++
 kernel/os/include/os/os_malloc.h                             | 8 ++++++++
 kernel/os/include/os/os_mbuf.h                               | 8 ++++++++
 kernel/os/include/os/os_mempool.h                            | 8 ++++++++
 kernel/os/include/os/os_mutex.h                              | 8 ++++++++
 kernel/os/include/os/os_sanity.h                             | 8 ++++++++
 kernel/os/include/os/os_sched.h                              | 8 ++++++++
 kernel/os/include/os/os_sem.h                                | 8 ++++++++
 kernel/os/include/os/os_task.h                               | 8 ++++++++
 kernel/os/include/os/os_test.h                               | 8 ++++++++
 kernel/os/include/os/os_time.h                               | 8 ++++++++
 kernel/os/include/os/queue.h                                 | 8 ++++++++
 kernel/os/src/os_priv.h                                      | 8 ++++++++
 kernel/os/test/src/os_test_priv.h                            | 8 ++++++++
 libc/baselibc/include/assert.h                               | 8 ++++++++
 libc/baselibc/include/ctype.h                                | 8 ++++++++
 libc/baselibc/include/inttypes.h                             | 8 ++++++++
 libc/baselibc/include/klibc/extern.h                         | 8 ++++++++
 libc/baselibc/include/klibc/inline.h                         | 8 ++++++++
 libc/baselibc/include/stdio.h                                | 8 ++++++++
 libc/baselibc/include/stdlib.h                               | 8 ++++++++
 libc/baselibc/include/string.h                               | 8 ++++++++
 libc/baselibc/src/baselibc_test/unittests.h                  | 8 ++++++++
 libc/baselibc/src/malloc.h                                   | 8 ++++++++
 libs/imgmgr/include/imgmgr/imgmgr.h                          | 8 ++++++++
 libs/imgmgr/src/imgmgr_priv.h                                | 8 ++++++++
 libs/iotivity/include/iotivity/oc_api.h                      | 8 ++++++++
 libs/iotivity/include/iotivity/oc_buffer.h                   | 8 ++++++++
 libs/iotivity/include/iotivity/oc_client_state.h             | 8 ++++++++
 libs/iotivity/include/iotivity/oc_constants.h                | 8 ++++++++
 libs/iotivity/include/iotivity/oc_core_res.h                 | 8 ++++++++
 libs/iotivity/include/iotivity/oc_discovery.h                | 8 ++++++++
 libs/iotivity/include/iotivity/oc_helpers.h                  | 8 ++++++++
 libs/iotivity/include/iotivity/oc_network_events.h           | 8 ++++++++
 libs/iotivity/include/iotivity/oc_rep.h                      | 8 ++++++++
 libs/iotivity/include/iotivity/oc_ri.h                       | 8 ++++++++
 libs/iotivity/include/iotivity/oc_uuid.h                     | 8 ++++++++
 libs/iotivity/src/api/oc_events.h                            | 8 ++++++++
 libs/iotivity/src/messaging/coap/coap.h                      | 8 ++++++++
 libs/iotivity/src/messaging/coap/conf.h                      | 8 ++++++++
 libs/iotivity/src/messaging/coap/constants.h                 | 8 ++++++++
 libs/iotivity/src/messaging/coap/engine.h                    | 8 ++++++++
 libs/iotivity/src/messaging/coap/observe.h                   | 8 ++++++++
 libs/iotivity/src/messaging/coap/oc_coap.h                   | 8 ++++++++
 libs/iotivity/src/messaging/coap/separate.h                  | 8 ++++++++
 libs/iotivity/src/messaging/coap/transactions.h              | 8 ++++++++
 libs/iotivity/src/port/mynewt/config.h                       | 8 ++++++++
 libs/iotivity/src/port/oc_assert.h                           | 8 ++++++++
 libs/iotivity/src/port/oc_clock.h                            | 8 ++++++++
 libs/iotivity/src/port/oc_connectivity.h                     | 8 ++++++++
 libs/iotivity/src/port/oc_log.h                              | 8 ++++++++
 libs/iotivity/src/port/oc_network_events_mutex.h             | 8 ++++++++
 libs/iotivity/src/port/oc_random.h                           | 8 ++++++++
 libs/iotivity/src/port/oc_signal_main_loop.h                 | 8 ++++++++
 libs/iotivity/src/port/oc_storage.h                          | 8 ++++++++
 libs/iotivity/src/security/oc_acl.h                          | 8 ++++++++
 libs/iotivity/src/security/oc_cred.h                         | 8 ++++++++
 libs/iotivity/src/security/oc_doxm.h                         | 8 ++++++++
 libs/iotivity/src/security/oc_dtls.h                         | 8 ++++++++
 libs/iotivity/src/security/oc_pstat.h                        | 8 ++++++++
 libs/iotivity/src/security/oc_store.h                        | 8 ++++++++
 libs/iotivity/src/security/oc_svr.h                          | 8 ++++++++
 libs/iotivity/src/util/oc_etimer.h                           | 8 ++++++++
 libs/iotivity/src/util/oc_list.h                             | 8 ++++++++
 libs/iotivity/src/util/oc_memb.h                             | 8 ++++++++
 libs/iotivity/src/util/oc_mmem.h                             | 8 ++++++++
 libs/iotivity/src/util/oc_process.h                          | 8 ++++++++
 libs/iotivity/src/util/oc_timer.h                            | 8 ++++++++
 libs/iotivity/src/util/pt/lc-addrlabels.h                    | 8 ++++++++
 libs/iotivity/src/util/pt/lc-switch.h                        | 8 ++++++++
 libs/iotivity/src/util/pt/lc.h                               | 8 ++++++++
 libs/iotivity/src/util/pt/pt-sem.h                           | 8 ++++++++
 libs/iotivity/src/util/pt/pt.h                               | 8 ++++++++
 libs/newtmgr/include/newtmgr/newtmgr.h                       | 8 ++++++++
 libs/newtmgr/nmgr_os/include/nmgr_os/nmgr_os.h               | 8 ++++++++
 libs/newtmgr/transport/ble/include/nmgrble/newtmgr_ble.h     | 8 ++++++++
 libs/newtmgr_oic/include/newtmgr/newtmgr.h                   | 8 ++++++++
 libs/util/include/util/datetime.h                            | 8 ++++++++
 libs/util/include/util/mem.h                                 | 8 ++++++++
 libs/util/include/util/util.h                                | 8 ++++++++
 net/ip/include/arch/cc.h                                     | 8 ++++++++
 net/ip/include/arch/sys_arch.h                               | 8 ++++++++
 net/ip/include/ip/init.h                                     | 8 ++++++++
 net/ip/include/ip/os_queue.h                                 | 8 ++++++++
 net/ip/include/lwipopts.h                                    | 8 ++++++++
 .../include/inet_def_service/inet_def_service.h              | 8 ++++++++
 net/ip/lwip_base/include/lwip/apps/httpd_opts.h              | 8 ++++++++
 net/ip/lwip_base/include/lwip/apps/mdns.h                    | 8 ++++++++
 net/ip/lwip_base/include/lwip/apps/mdns_opts.h               | 8 ++++++++
 net/ip/lwip_base/include/lwip/apps/mdns_priv.h               | 8 ++++++++
 net/ip/lwip_base/include/lwip/apps/netbiosns.h               | 8 ++++++++
 net/ip/lwip_base/include/lwip/apps/netbiosns_opts.h          | 8 ++++++++
 net/ip/lwip_base/include/lwip/apps/snmp_opts.h               | 8 ++++++++
 net/ip/lwip_base/include/lwip/apps/snmpv3.h                  | 8 ++++++++
 net/ip/lwip_base/include/lwip/apps/sntp_opts.h               | 8 ++++++++
 net/ip/lwip_base/include/lwip/debug.h                        | 8 ++++++++
 net/ip/lwip_base/include/lwip/dhcp6.h                        | 8 ++++++++
 net/ip/lwip_base/include/lwip/opt.h                          | 8 ++++++++
 net/ip/lwip_base/include/lwip/priv/memp_std.h                | 8 ++++++++
 net/ip/lwip_base/include/lwip/prot/ip.h                      | 8 ++++++++
 net/ip/lwip_base/include/netif/lowpan6_opts.h                | 8 ++++++++
 net/ip/lwip_base/include/netif/ppp/ccp.h                     | 8 ++++++++
 net/ip/lwip_base/include/netif/ppp/chap-new.h                | 8 ++++++++
 net/ip/lwip_base/include/netif/ppp/chap_ms.h                 | 8 ++++++++
 net/ip/lwip_base/include/netif/ppp/eui64.h                   | 8 ++++++++
 net/ip/lwip_base/include/netif/ppp/fsm.h                     | 8 ++++++++
 net/ip/lwip_base/include/netif/ppp/ipcp.h                    | 8 ++++++++
 net/ip/lwip_base/include/netif/ppp/ipv6cp.h                  | 8 ++++++++
 net/ip/lwip_base/include/netif/ppp/lcp.h                     | 8 ++++++++
 net/ip/lwip_base/include/netif/ppp/magic.h                   | 8 ++++++++
 net/ip/lwip_base/include/netif/ppp/mppe.h                    | 8 ++++++++
 net/ip/lwip_base/include/netif/ppp/ppp.h                     | 8 ++++++++
 net/ip/lwip_base/include/netif/ppp/ppp_impl.h                | 8 ++++++++
 net/ip/lwip_base/include/netif/ppp/ppp_opts.h                | 8 ++++++++
 net/ip/lwip_base/include/netif/ppp/pppcrypt.h                | 8 ++++++++
 net/ip/lwip_base/include/netif/ppp/pppdebug.h                | 8 ++++++++
 net/ip/lwip_base/include/netif/ppp/pppoe.h                   | 8 ++++++++
 net/ip/lwip_base/include/netif/ppp/pppol2tp.h                | 8 ++++++++
 net/ip/lwip_base/include/netif/ppp/pppos.h                   | 8 ++++++++
 net/ip/lwip_base/include/netif/ppp/upap.h                    | 8 ++++++++
 net/ip/lwip_base/include/netif/ppp/vj.h                      | 8 ++++++++
 net/ip/lwip_base/src/apps/httpd/fsdata.h                     | 8 ++++++++
 net/ip/lwip_base/src/apps/httpd/httpd_structs.h              | 8 ++++++++
 net/ip/lwip_base/src/apps/snmp/snmpv3_priv.h                 | 8 ++++++++
 net/ip/lwip_base/test/unit/core/test_mem.h                   | 8 ++++++++
 net/ip/lwip_base/test/unit/core/test_pbuf.h                  | 8 ++++++++
 net/ip/lwip_base/test/unit/dhcp/test_dhcp.h                  | 8 ++++++++
 net/ip/lwip_base/test/unit/etharp/test_etharp.h              | 8 ++++++++
 net/ip/lwip_base/test/unit/lwip_check.h                      | 8 ++++++++
 net/ip/lwip_base/test/unit/lwipopts.h                        | 8 ++++++++
 net/ip/lwip_base/test/unit/mdns/test_mdns.h                  | 8 ++++++++
 net/ip/lwip_base/test/unit/tcp/tcp_helper.h                  | 8 ++++++++
 net/ip/lwip_base/test/unit/tcp/test_tcp.h                    | 8 ++++++++
 net/ip/lwip_base/test/unit/tcp/test_tcp_oos.h                | 8 ++++++++
 net/ip/lwip_base/test/unit/udp/test_udp.h                    | 8 ++++++++
 net/ip/mn_socket/include/mn_socket/arch/sim/native_sock.h    | 8 ++++++++
 net/ip/mn_socket/include/mn_socket/mn_socket.h               | 8 ++++++++
 net/ip/mn_socket/include/mn_socket/mn_socket_ops.h           | 8 ++++++++
 net/ip/mn_socket/src/arch/sim/native_sock_priv.h             | 8 ++++++++
 net/ip/src/ip_priv.h                                         | 8 ++++++++
 net/nimble/controller/include/controller/ble_hw.h            | 8 ++++++++
 net/nimble/controller/include/controller/ble_ll.h            | 8 ++++++++
 net/nimble/controller/include/controller/ble_ll_adv.h        | 8 ++++++++
 net/nimble/controller/include/controller/ble_ll_conn.h       | 8 ++++++++
 net/nimble/controller/include/controller/ble_ll_ctrl.h       | 8 ++++++++
 net/nimble/controller/include/controller/ble_ll_hci.h        | 8 ++++++++
 net/nimble/controller/include/controller/ble_ll_resolv.h     | 8 ++++++++
 net/nimble/controller/include/controller/ble_ll_scan.h       | 8 ++++++++
 net/nimble/controller/include/controller/ble_ll_sched.h      | 8 ++++++++
 net/nimble/controller/include/controller/ble_ll_whitelist.h  | 8 ++++++++
 net/nimble/controller/include/controller/ble_phy.h           | 8 ++++++++
 net/nimble/controller/src/ble_ll_conn_priv.h                 | 8 ++++++++
 net/nimble/host/include/host/ble_att.h                       | 8 ++++++++
 net/nimble/host/include/host/ble_eddystone.h                 | 8 ++++++++
 net/nimble/host/include/host/ble_gap.h                       | 8 ++++++++
 net/nimble/host/include/host/ble_gatt.h                      | 8 ++++++++
 net/nimble/host/include/host/ble_hs.h                        | 8 ++++++++
 net/nimble/host/include/host/ble_hs_adv.h                    | 8 ++++++++
 net/nimble/host/include/host/ble_hs_id.h                     | 8 ++++++++
 net/nimble/host/include/host/ble_hs_log.h                    | 8 ++++++++
 net/nimble/host/include/host/ble_hs_mbuf.h                   | 8 ++++++++
 net/nimble/host/include/host/ble_hs_test.h                   | 8 ++++++++
 net/nimble/host/include/host/ble_ibeacon.h                   | 8 ++++++++
 net/nimble/host/include/host/ble_l2cap.h                     | 8 ++++++++
 net/nimble/host/include/host/ble_sm.h                        | 8 ++++++++
 net/nimble/host/include/host/ble_store.h                     | 8 ++++++++
 net/nimble/host/include/host/ble_uuid.h                      | 8 ++++++++
 .../host/profiles/lls/include/profiles/lls/ble_svc_lls.h     | 8 ++++++++
 net/nimble/host/services/bleuart/include/bleuart/bleuart.h   | 8 ++++++++
 .../host/services/gap/include/services/gap/ble_svc_gap.h     | 8 ++++++++
 .../host/services/gatt/include/services/gatt/ble_svc_gatt.h  | 8 ++++++++
 .../host/services/lls/include/services/lls/ble_svc_lls.h     | 8 ++++++++
 net/nimble/host/src/ble_att_cmd_priv.h                       | 8 ++++++++
 net/nimble/host/src/ble_att_priv.h                           | 8 ++++++++
 net/nimble/host/src/ble_gap_priv.h                           | 8 ++++++++
 net/nimble/host/src/ble_gatt_priv.h                          | 8 ++++++++
 net/nimble/host/src/ble_hs_adv_priv.h                        | 8 ++++++++
 net/nimble/host/src/ble_hs_atomic_priv.h                     | 8 ++++++++
 net/nimble/host/src/ble_hs_conn_priv.h                       | 8 ++++++++
 net/nimble/host/src/ble_hs_dbg_priv.h                        | 8 ++++++++
 net/nimble/host/src/ble_hs_endian_priv.h                     | 8 ++++++++
 net/nimble/host/src/ble_hs_hci_priv.h                        | 8 ++++++++
 net/nimble/host/src/ble_hs_id_priv.h                         | 8 ++++++++
 net/nimble/host/src/ble_hs_mbuf_priv.h                       | 8 ++++++++
 net/nimble/host/src/ble_hs_priv.h                            | 8 ++++++++
 net/nimble/host/src/ble_hs_pvcy_priv.h                       | 8 ++++++++
 net/nimble/host/src/ble_hs_startup_priv.h                    | 8 ++++++++
 net/nimble/host/src/ble_l2cap_priv.h                         | 8 ++++++++
 net/nimble/host/src/ble_l2cap_sig_priv.h                     | 8 ++++++++
 net/nimble/host/src/ble_sm_priv.h                            | 8 ++++++++
 net/nimble/host/src/ble_uuid_priv.h                          | 8 ++++++++
 net/nimble/host/store/ram/include/store/ram/ble_store_ram.h  | 8 ++++++++
 net/nimble/host/test/src/ble_hs_test_util.h                  | 8 ++++++++
 net/nimble/host/test/src/ble_hs_test_util_store.h            | 8 ++++++++
 net/nimble/host/test/src/ble_sm_test_util.h                  | 8 ++++++++
 net/nimble/include/nimble/ble.h                              | 8 ++++++++
 net/nimble/include/nimble/ble_hci_trans.h                    | 8 ++++++++
 net/nimble/include/nimble/hci_common.h                       | 8 ++++++++
 net/nimble/include/nimble/nimble_opt.h                       | 8 ++++++++
 net/nimble/include/nimble/nimble_opt_auto.h                  | 8 ++++++++
 net/nimble/transport/ram/include/transport/ram/ble_hci_ram.h | 8 ++++++++
 .../transport/uart/include/transport/uart/ble_hci_uart.h     | 8 ++++++++
 net/wifi/wifi_mgmt/include/wifi_mgmt/wifi_mgmt.h             | 8 ++++++++
 net/wifi/wifi_mgmt/include/wifi_mgmt/wifi_mgmt_if.h          | 8 ++++++++
 net/wifi/wifi_mgmt/src/wifi_priv.h                           | 8 ++++++++
 sys/config/include/config/config.h                           | 8 ++++++++
 sys/config/include/config/config_fcb.h                       | 8 ++++++++
 sys/config/include/config/config_file.h                      | 8 ++++++++
 sys/config/src/config_priv.h                                 | 8 ++++++++
 sys/config/test/src/conf_test.h                              | 8 ++++++++
 sys/config/test/src/config_test.h                            | 8 ++++++++
 sys/console/full/include/console/console.h                   | 8 ++++++++
 sys/console/full/include/console/prompt.h                    | 8 ++++++++
 sys/console/stub/include/console/console.h                   | 8 ++++++++
 sys/console/stub/include/console/prompt.h                    | 8 ++++++++
 sys/id/include/id/id.h                                       | 8 ++++++++
 sys/log/include/log/ignore.h                                 | 8 ++++++++
 sys/log/include/log/log.h                                    | 8 ++++++++
 sys/reboot/include/reboot/log_reboot.h                       | 8 ++++++++
 sys/shell/include/shell/shell.h                              | 8 ++++++++
 sys/shell/include/shell/shell_prompt.h                       | 8 ++++++++
 sys/shell/src/shell_priv.h                                   | 8 ++++++++
 sys/stats/include/stats/stats.h                              | 8 ++++++++
 sys/sysinit/include/sysinit/sysinit.h                        | 8 ++++++++
 test/crash_test/include/crash_test/crash_test.h              | 8 ++++++++
 test/crash_test/src/crash_test_priv.h                        | 8 ++++++++
 test/flash_test/include/flash_test/flash_test.h              | 8 ++++++++
 test/testreport/include/testreport/testreport.h              | 8 ++++++++
 test/testreport/src/testreport_priv.h                        | 8 ++++++++
 test/testutil/include/testutil/testutil.h                    | 8 ++++++++
 test/testutil/src/testutil_priv.h                            | 8 ++++++++
 util/cbmem/include/cbmem/cbmem.h                             | 8 ++++++++
 util/cbmem/test/src/util_test_priv.h                         | 8 ++++++++
 util/crc/include/crc/crc16.h                                 | 8 ++++++++
 util/crc/include/crc/crc8.h                                  | 8 ++++++++
 521 files changed, 4162 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/apps/blecent/src/blecent.h
----------------------------------------------------------------------
diff --git a/apps/blecent/src/blecent.h b/apps/blecent/src/blecent.h
index 4731eb9..83f1c2c 100644
--- a/apps/blecent/src/blecent.h
+++ b/apps/blecent/src/blecent.h
@@ -22,6 +22,10 @@
 
 #include "os/queue.h"
 #include "log/log.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct ble_hs_adv_fields;
 struct ble_gap_conn_desc;
 struct ble_hs_cfg;
@@ -114,4 +118,8 @@ int peer_delete(uint16_t conn_handle);
 int peer_add(uint16_t conn_handle);
 int peer_init(int max_peers, int max_svcs, int max_chrs, int max_dscs);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/apps/bleprph/src/bleprph.h
----------------------------------------------------------------------
diff --git a/apps/bleprph/src/bleprph.h b/apps/bleprph/src/bleprph.h
index 8db1dc7..0d75c84 100644
--- a/apps/bleprph/src/bleprph.h
+++ b/apps/bleprph/src/bleprph.h
@@ -21,6 +21,10 @@
 #define H_BLEPRPH_
 
 #include "log/log.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct ble_hs_cfg;
 struct ble_gatt_register_ctxt;
 
@@ -48,4 +52,8 @@ int gatt_svr_init(void);
 void print_bytes(const uint8_t *bytes, int len);
 void print_addr(const void *addr);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/apps/bletest/src/bletest_priv.h
----------------------------------------------------------------------
diff --git a/apps/bletest/src/bletest_priv.h b/apps/bletest/src/bletest_priv.h
index 05d03d1..268071a 100644
--- a/apps/bletest/src/bletest_priv.h
+++ b/apps/bletest/src/bletest_priv.h
@@ -20,6 +20,10 @@
 #ifndef H_BLETEST_PRIV_
 #define H_BLETEST_PRIV_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 void bletest_send_conn_update(uint16_t handle);
 
 #if (MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_ENCRYPTION) == 1)
@@ -63,4 +67,8 @@ int bletest_hci_le_add_resolv_list(uint8_t *local_irk, 
uint8_t *peer_irk,
 int bletest_hci_le_enable_resolv_list(uint8_t enable);
 
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif  /* H_BLETEST_PRIV_*/

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/apps/bletiny/src/bletiny.h
----------------------------------------------------------------------
diff --git a/apps/bletiny/src/bletiny.h b/apps/bletiny/src/bletiny.h
index 5b447a7..f840c69 100644
--- a/apps/bletiny/src/bletiny.h
+++ b/apps/bletiny/src/bletiny.h
@@ -26,6 +26,10 @@
 #include "os/queue.h"
 
 #include "host/ble_gatt.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct ble_gap_white_entry;
 struct ble_hs_adv_fields;
 struct ble_gap_upd_params;
@@ -204,4 +208,8 @@ uint16_t chr_end_handle(const struct bletiny_svc *svc,
 int chr_is_empty(const struct bletiny_svc *svc, const struct bletiny_chr *chr);
 void print_conn_desc(const struct ble_gap_conn_desc *desc);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/boot/boot_serial/include/boot_serial/boot_serial.h
----------------------------------------------------------------------
diff --git a/boot/boot_serial/include/boot_serial/boot_serial.h 
b/boot/boot_serial/include/boot_serial/boot_serial.h
index 67fa415..b9f6f6f 100644
--- a/boot/boot_serial/include/boot_serial/boot_serial.h
+++ b/boot/boot_serial/include/boot_serial/boot_serial.h
@@ -20,6 +20,10 @@
 #ifndef __BOOT_SERIAL_H__
 #define __BOOT_SERIAL_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * Create a task for uploading image0 over serial.
  *
@@ -30,4 +34,8 @@
 int boot_serial_task_init(struct os_task *task, uint8_t prio,
   os_stack_t *stack, uint16_t stack_size, int max_input);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /*  __BOOT_SERIAL_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/boot/boot_serial/src/boot_serial_priv.h
----------------------------------------------------------------------
diff --git a/boot/boot_serial/src/boot_serial_priv.h 
b/boot/boot_serial/src/boot_serial_priv.h
index d1da24f..d2eddb6 100644
--- a/boot/boot_serial/src/boot_serial_priv.h
+++ b/boot/boot_serial/src/boot_serial_priv.h
@@ -20,6 +20,10 @@
 #ifndef __BOOTUTIL_SERIAL_PRIV_H__
 #define __BOOTUTIL_SERIAL_PRIV_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * From shell.h
  */
@@ -61,4 +65,8 @@ struct nmgr_hdr {
 
 void boot_serial_input(char *buf, int len);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /*  __BOOTUTIL_SERIAL_PRIV_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/boot/bootutil/include/bootutil/bootutil_misc.h
----------------------------------------------------------------------
diff --git a/boot/bootutil/include/bootutil/bootutil_misc.h 
b/boot/bootutil/include/bootutil/bootutil_misc.h
index 2e3049d..784820e 100644
--- a/boot/bootutil/include/bootutil/bootutil_misc.h
+++ b/boot/bootutil/include/bootutil/bootutil_misc.h
@@ -20,9 +20,17 @@
 #ifndef __BOOTUTIL_MISC_H_
 #define __BOOTUTIL_MISC_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int boot_vect_read_test(int *slot);
 int boot_vect_read_main(int *slot);
 int boot_vect_write_test(int slot);
 int boot_vect_write_main(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /*  __BOOTUTIL_MISC_H_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/boot/bootutil/include/bootutil/bootutil_test.h
----------------------------------------------------------------------
diff --git a/boot/bootutil/include/bootutil/bootutil_test.h 
b/boot/bootutil/include/bootutil/bootutil_test.h
index 55c8a67..c463b1b 100644
--- a/boot/bootutil/include/bootutil/bootutil_test.h
+++ b/boot/bootutil/include/bootutil/bootutil_test.h
@@ -20,6 +20,14 @@
 #ifndef H_BOOTUTIL_TEST_
 #define H_BOOTUTIL_TEST_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int boot_test_all(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/boot/bootutil/include/bootutil/image.h
----------------------------------------------------------------------
diff --git a/boot/bootutil/include/bootutil/image.h 
b/boot/bootutil/include/bootutil/image.h
index 0974d5b..67e56e0 100644
--- a/boot/bootutil/include/bootutil/image.h
+++ b/boot/bootutil/include/bootutil/image.h
@@ -22,6 +22,10 @@
 
 #include <inttypes.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define IMAGE_MAGIC                 0x96f3b83c
 #define IMAGE_MAGIC_NONE            0xffffffff
 
@@ -86,4 +90,8 @@ int bootutil_img_validate(struct image_header *hdr, uint8_t 
flash_id,
                         uint32_t addr, uint8_t *tmp_buf, uint32_t tmp_buf_sz,
                         uint8_t *seed, int seed_len, uint8_t *out_hash);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/boot/bootutil/include/bootutil/loader.h
----------------------------------------------------------------------
diff --git a/boot/bootutil/include/bootutil/loader.h 
b/boot/bootutil/include/bootutil/loader.h
index 75e0d01..ec1619a 100644
--- a/boot/bootutil/include/bootutil/loader.h
+++ b/boot/bootutil/include/bootutil/loader.h
@@ -21,6 +21,10 @@
 #define H_LOADER_
 
 #include <inttypes.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct image_header;
 
 /** A request object instructing the boot loader how to proceed. */
@@ -81,4 +85,8 @@ boot_go(const struct boot_req *req, struct boot_rsp *rsp);
 int
 split_go(int loader_slot, int split_slot, void **entry);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/boot/bootutil/include/bootutil/sign_key.h
----------------------------------------------------------------------
diff --git a/boot/bootutil/include/bootutil/sign_key.h 
b/boot/bootutil/include/bootutil/sign_key.h
index 5ccda90..7aa807a 100644
--- a/boot/bootutil/include/bootutil/sign_key.h
+++ b/boot/bootutil/include/bootutil/sign_key.h
@@ -22,6 +22,10 @@
 
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct bootutil_key {
     const uint8_t *key;
     const unsigned int *len;
@@ -30,4 +34,8 @@ struct bootutil_key {
 extern const struct bootutil_key bootutil_keys[];
 extern const int bootutil_key_cnt;
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __BOOTUTIL_SIGN_KEY_H_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/boot/bootutil/src/bootutil_priv.h
----------------------------------------------------------------------
diff --git a/boot/bootutil/src/bootutil_priv.h 
b/boot/bootutil/src/bootutil_priv.h
index e5b231c..d24a671 100644
--- a/boot/bootutil/src/bootutil_priv.h
+++ b/boot/bootutil/src/bootutil_priv.h
@@ -22,6 +22,10 @@
 
 #include "bootutil/image.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define BOOT_EFLASH     1
 #define BOOT_EFILE      2
 #define BOOT_EBADIMAGE  3
@@ -71,5 +75,9 @@ void boot_scratch_magic(struct boot_img_trailer *bit);
 struct boot_req;
 void boot_req_set(struct boot_req *req);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/boot/split/include/split/split.h
----------------------------------------------------------------------
diff --git a/boot/split/include/split/split.h b/boot/split/include/split/split.h
index 0cf78e3..ede0f28 100644
--- a/boot/split/include/split/split.h
+++ b/boot/split/include/split/split.h
@@ -20,6 +20,10 @@
 #ifndef _SPLIT_H__
 #define _SPLIT_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define SPLIT_NMGR_OP_SPLIT 0
 
 typedef enum {
@@ -54,4 +58,8 @@ void split_app_init(void);
  * @Returns zero on success, non-zero on failures */
 int split_app_go(void **entry, int toboot);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _SPLIT_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/boot/split/include/split/split_priv.h
----------------------------------------------------------------------
diff --git a/boot/split/include/split/split_priv.h 
b/boot/split/include/split/split_priv.h
index 0478b75..d051587 100644
--- a/boot/split/include/split/split_priv.h
+++ b/boot/split/include/split/split_priv.h
@@ -20,11 +20,19 @@
 #ifndef SPLIT_PRIV_H
 #define SPLIT_PRIV_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int split_conf_init(void);
 int split_nmgr_register(void);
 int split_read_split(split_mode_t *split);
 int split_write_split(split_mode_t mode);
 split_status_t split_check_status(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* SPLIT_PRIV_H */
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/crypto/mbedtls/include/mbedtls/bn_mul.h
----------------------------------------------------------------------
diff --git a/crypto/mbedtls/include/mbedtls/bn_mul.h 
b/crypto/mbedtls/include/mbedtls/bn_mul.h
index 5408d41..269ecb4 100644
--- a/crypto/mbedtls/include/mbedtls/bn_mul.h
+++ b/crypto/mbedtls/include/mbedtls/bn_mul.h
@@ -39,6 +39,10 @@
 
 #include "bignum.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #if defined(MBEDTLS_HAVE_ASM)
 
 #ifndef asm
@@ -873,4 +877,8 @@
 #endif /* C (generic)  */
 #endif /* C (longlong) */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* bn_mul.h */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/crypto/mbedtls/include/mbedtls/check_config.h
----------------------------------------------------------------------
diff --git a/crypto/mbedtls/include/mbedtls/check_config.h 
b/crypto/mbedtls/include/mbedtls/check_config.h
index b6448ec..a2e4f4b 100644
--- a/crypto/mbedtls/include/mbedtls/check_config.h
+++ b/crypto/mbedtls/include/mbedtls/check_config.h
@@ -29,6 +29,10 @@
 #ifndef MBEDTLS_CHECK_CONFIG_H
 #define MBEDTLS_CHECK_CONFIG_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * We assume CHAR_BIT is 8 in many places. In practice, this is true on our
  * target platforms, so not an issue, but let's just be extra sure.
@@ -537,4 +541,8 @@
  */
 typedef int mbedtls_iso_c_forbids_empty_translation_units;
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* MBEDTLS_CHECK_CONFIG_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/crypto/mbedtls/include/mbedtls/compat-1.3.h
----------------------------------------------------------------------
diff --git a/crypto/mbedtls/include/mbedtls/compat-1.3.h 
b/crypto/mbedtls/include/mbedtls/compat-1.3.h
index 27abbd9..2180374 100644
--- a/crypto/mbedtls/include/mbedtls/compat-1.3.h
+++ b/crypto/mbedtls/include/mbedtls/compat-1.3.h
@@ -33,6 +33,10 @@
 #ifndef MBEDTLS_COMPAT13_H
 #define MBEDTLS_COMPAT13_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * config.h options
  */
@@ -2631,4 +2635,8 @@
 #define xtea_setup mbedtls_xtea_setup
 
 #endif /* compat-1.3.h */
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* MBEDTLS_DEPRECATED_REMOVED */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/crypto/mbedtls/include/mbedtls/config.h
----------------------------------------------------------------------
diff --git a/crypto/mbedtls/include/mbedtls/config.h 
b/crypto/mbedtls/include/mbedtls/config.h
index 11ca32f..f180aae 100644
--- a/crypto/mbedtls/include/mbedtls/config.h
+++ b/crypto/mbedtls/include/mbedtls/config.h
@@ -28,6 +28,10 @@
 #ifndef MBEDTLS_CONFIG_H
 #define MBEDTLS_CONFIG_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
 #define _CRT_SECURE_NO_DEPRECATE 1
 #endif
@@ -2520,4 +2524,8 @@
 
 #include "check_config.h"
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* MBEDTLS_CONFIG_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/crypto/mbedtls/include/mbedtls/config_mynewt.h
----------------------------------------------------------------------
diff --git a/crypto/mbedtls/include/mbedtls/config_mynewt.h 
b/crypto/mbedtls/include/mbedtls/config_mynewt.h
index a18ac6f..9de0d31 100644
--- a/crypto/mbedtls/include/mbedtls/config_mynewt.h
+++ b/crypto/mbedtls/include/mbedtls/config_mynewt.h
@@ -28,6 +28,10 @@
 #ifndef MBEDTLS_CONFIG_MYNEWT_H
 #define MBEDTLS_CONFIG_MYNEWT_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #undef MBEDTLS_HAVE_TIME /* we have no time.h */
 #undef MBEDTLS_HAVE_TIME_DATE
 #define MBEDTLS_PLATFORM_PRINTF_ALT    console_print
@@ -136,4 +140,8 @@
 /* \} name SECTION: Module configuration options */
 
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* MBEDTLS_CONFIG_MYNEWT_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/crypto/mbedtls/include/mbedtls/mbedtls_test.h
----------------------------------------------------------------------
diff --git a/crypto/mbedtls/include/mbedtls/mbedtls_test.h 
b/crypto/mbedtls/include/mbedtls/mbedtls_test.h
index 9f4b67c..7a3bc40 100644
--- a/crypto/mbedtls/include/mbedtls/mbedtls_test.h
+++ b/crypto/mbedtls/include/mbedtls/mbedtls_test.h
@@ -19,6 +19,14 @@
 #ifndef _MBEDTLS_TEST_H_
 #define _MBEDTLS_TEST_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int mbedtls_test_all();
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/crypto/mbedtls/include/mbedtls/pk_internal.h
----------------------------------------------------------------------
diff --git a/crypto/mbedtls/include/mbedtls/pk_internal.h 
b/crypto/mbedtls/include/mbedtls/pk_internal.h
index 01d0f21..f04e8ec 100644
--- a/crypto/mbedtls/include/mbedtls/pk_internal.h
+++ b/crypto/mbedtls/include/mbedtls/pk_internal.h
@@ -24,6 +24,10 @@
 #ifndef MBEDTLS_PK_WRAP_H
 #define MBEDTLS_PK_WRAP_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #if !defined(MBEDTLS_CONFIG_FILE)
 #include "config.h"
 #else
@@ -111,4 +115,8 @@ extern const mbedtls_pk_info_t mbedtls_ecdsa_info;
 extern const mbedtls_pk_info_t mbedtls_rsa_alt_info;
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* MBEDTLS_PK_WRAP_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/encoding/base64/include/base64/base64.h
----------------------------------------------------------------------
diff --git a/encoding/base64/include/base64/base64.h 
b/encoding/base64/include/base64/base64.h
index 8e0c045..538e069 100644
--- a/encoding/base64/include/base64/base64.h
+++ b/encoding/base64/include/base64/base64.h
@@ -22,6 +22,10 @@
 #include <stdint.h>
 #include <string.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int base64_encode(const void *, int, char *, uint8_t);
 int base64_decode(const char *, void *buf);
 int base64_pad(char *, int);
@@ -29,4 +33,8 @@ int base64_decode_len(const char *str);
 
 #define BASE64_ENCODE_SIZE(__size) ((((__size) * 4) / 3) + 4)
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __UTIL_BASE64_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/encoding/base64/include/base64/hex.h
----------------------------------------------------------------------
diff --git a/encoding/base64/include/base64/hex.h 
b/encoding/base64/include/base64/hex.h
index 1e9d8c8..63ebc97 100644
--- a/encoding/base64/include/base64/hex.h
+++ b/encoding/base64/include/base64/hex.h
@@ -19,7 +19,15 @@
 #ifndef _UTIL_HEX_H_
 #define _UTIL_HEX_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 char *hex_format(void *src_v, int src_len, char *dst, int dst_len);
 int hex_parse(char *src, int src_len, void *dst_v, int dst_len);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _UTIL_HEX_H_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/encoding/base64/test/src/encoding_test_priv.h
----------------------------------------------------------------------
diff --git a/encoding/base64/test/src/encoding_test_priv.h 
b/encoding/base64/test/src/encoding_test_priv.h
index fc2fcac..424bb28 100644
--- a/encoding/base64/test/src/encoding_test_priv.h
+++ b/encoding/base64/test/src/encoding_test_priv.h
@@ -20,6 +20,14 @@
 #ifndef __ENCODING_TEST_PRIV_
 #define __ENCODING_TEST_PRIV_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int hex_fmt_test_suite(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/encoding/json/include/json/json.h
----------------------------------------------------------------------
diff --git a/encoding/json/include/json/json.h 
b/encoding/json/include/json/json.h
index ecf098a..7c2939d 100644
--- a/encoding/json/include/json/json.h
+++ b/encoding/json/include/json/json.h
@@ -27,6 +27,10 @@
 #include <sys/types.h>
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define JSON_VALUE_TYPE_BOOL   (0)
 #define JSON_VALUE_TYPE_UINT64 (1)
 #define JSON_VALUE_TYPE_INT64  (2)
@@ -242,4 +246,8 @@ int json_read_array(struct json_buffer *, const struct 
json_array_t *);
         .addr.array.count = n, \
         .addr.array.maxlen = (int)(sizeof(a)/sizeof(a[0]))
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _JSON_H_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/encoding/json/test/src/test_json.h
----------------------------------------------------------------------
diff --git a/encoding/json/test/src/test_json.h 
b/encoding/json/test/src/test_json.h
index ea5efcf..b7b9742 100644
--- a/encoding/json/test/src/test_json.h
+++ b/encoding/json/test/src/test_json.h
@@ -20,8 +20,16 @@
 #ifndef TEST_JSON_H
 #define TEST_JSON_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 TEST_CASE_DECL(test_json_simple_encode);
 TEST_CASE_DECL(test_json_simple_decode);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* TEST_JSON_H */
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/encoding/tinycbor/include/tinycbor/cborconstants_p.h
----------------------------------------------------------------------
diff --git a/encoding/tinycbor/include/tinycbor/cborconstants_p.h 
b/encoding/tinycbor/include/tinycbor/cborconstants_p.h
index d5808c3..2dc0394 100644
--- a/encoding/tinycbor/include/tinycbor/cborconstants_p.h
+++ b/encoding/tinycbor/include/tinycbor/cborconstants_p.h
@@ -1,6 +1,10 @@
 #ifndef CBORCONSTANTS_P_H
 #define CBORCONSTANTS_P_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * CBOR Major types
  * Encoded in the high 3 bits of the descriptor byte
@@ -49,4 +53,8 @@ enum {
     BreakByte               = (unsigned)Break | (SimpleTypesType << 
MajorTypeShift)
 };
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* CBORCONSTANTS_P_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/encoding/tinycbor/include/tinycbor/compilersupport_p.h
----------------------------------------------------------------------
diff --git a/encoding/tinycbor/include/tinycbor/compilersupport_p.h 
b/encoding/tinycbor/include/tinycbor/compilersupport_p.h
index 4e0dbe3..d4227f6 100644
--- a/encoding/tinycbor/include/tinycbor/compilersupport_p.h
+++ b/encoding/tinycbor/include/tinycbor/compilersupport_p.h
@@ -27,6 +27,10 @@
 
 #include "cbor.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #ifndef _BSD_SOURCE
 #  define _BSD_SOURCE
 #endif
@@ -214,5 +218,9 @@ static inline unsigned short encode_half(double val)
 #endif
 }
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* COMPILERSUPPORT_H */
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/encoding/tinycbor/include/tinycbor/math_support_p.h
----------------------------------------------------------------------
diff --git a/encoding/tinycbor/include/tinycbor/math_support_p.h 
b/encoding/tinycbor/include/tinycbor/math_support_p.h
index 676f781..f09a07e 100644
--- a/encoding/tinycbor/include/tinycbor/math_support_p.h
+++ b/encoding/tinycbor/include/tinycbor/math_support_p.h
@@ -27,6 +27,10 @@
 
 #include <math.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* this function was copied & adapted from RFC 7049 Appendix D */
 static inline double decode_half(unsigned short half)
 {
@@ -43,5 +47,9 @@ static inline double decode_half(unsigned short half)
 #endif
 }
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // MATH_SUPPORT_H
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/fs/fcb/include/fcb/fcb.h
----------------------------------------------------------------------
diff --git a/fs/fcb/include/fcb/fcb.h b/fs/fcb/include/fcb/fcb.h
index a6b3f88..2632f4a 100644
--- a/fs/fcb/include/fcb/fcb.h
+++ b/fs/fcb/include/fcb/fcb.h
@@ -19,6 +19,10 @@
 #ifndef __SYS_FCB_H_
 #define __SYS_FCB_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * Flash circular buffer.
  */
@@ -131,4 +135,8 @@ fcb_offset_last_n(struct fcb *fcb, uint8_t entries, 
uint32_t *last_n_off);
  */
 int fcb_clear(struct fcb *fcb);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __SYS_FLASHVAR_H_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/fs/fcb/src/fcb_priv.h
----------------------------------------------------------------------
diff --git a/fs/fcb/src/fcb_priv.h b/fs/fcb/src/fcb_priv.h
index b7a9e0b..6506e12 100644
--- a/fs/fcb/src/fcb_priv.h
+++ b/fs/fcb/src/fcb_priv.h
@@ -19,6 +19,10 @@
 #ifndef __SYS_FCB_PRIV_H_
 #define __SYS_FCB_PRIV_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define FCB_CRC_SZ     sizeof(uint8_t)
 #define FCB_TMP_BUF_SZ 32
 
@@ -54,4 +58,8 @@ int fcb_sector_hdr_init(struct fcb *, struct flash_area *fap, 
uint16_t id);
 int fcb_sector_hdr_read(struct fcb *, struct flash_area *fap,
   struct fcb_disk_area *fdap);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/fs/fs/include/fs/fs.h
----------------------------------------------------------------------
diff --git a/fs/fs/include/fs/fs.h b/fs/fs/include/fs/fs.h
index e29f7f3..c57735f 100644
--- a/fs/fs/include/fs/fs.h
+++ b/fs/fs/include/fs/fs.h
@@ -23,6 +23,10 @@
 #include <stddef.h>
 #include <inttypes.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * Common interface to access files.
  */
@@ -75,4 +79,8 @@ int fs_dirent_is_dir(const struct fs_dirent *);
 #define FS_EACCESS      12  /* Operation prohibited by file open mode */
 #define FS_EUNINIT      13  /* File system not initialized */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/fs/fs/include/fs/fs_if.h
----------------------------------------------------------------------
diff --git a/fs/fs/include/fs/fs_if.h b/fs/fs/include/fs/fs_if.h
index a2d4af4..c82b78e 100644
--- a/fs/fs/include/fs/fs_if.h
+++ b/fs/fs/include/fs/fs_if.h
@@ -20,6 +20,10 @@
 #ifndef __FS_IF_H__
 #define __FS_IF_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * Common interface filesystem(s) provide.
  */
@@ -55,4 +59,8 @@ struct fs_ops {
  */
 int fs_register(const struct fs_ops *);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/fs/fs/include/fs/fsutil.h
----------------------------------------------------------------------
diff --git a/fs/fs/include/fs/fsutil.h b/fs/fs/include/fs/fsutil.h
index 44c8b1e..f00e3c6 100644
--- a/fs/fs/include/fs/fsutil.h
+++ b/fs/fs/include/fs/fsutil.h
@@ -22,8 +22,16 @@
 
 #include <inttypes.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int fsutil_read_file(const char *path, uint32_t offset, uint32_t len,
                      void *dst, uint32_t *out_len);
 int fsutil_write_file(const char *path, const void *data, uint32_t len);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/fs/fs/src/fs_priv.h
----------------------------------------------------------------------
diff --git a/fs/fs/src/fs_priv.h b/fs/fs/src/fs_priv.h
index f8f092d..dfef7d1 100644
--- a/fs/fs/src/fs_priv.h
+++ b/fs/fs/src/fs_priv.h
@@ -21,6 +21,10 @@
 
 #include "syscfg/syscfg.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct fs_ops;
 extern const struct fs_ops *fs_root_ops;
 
@@ -28,4 +32,8 @@ extern const struct fs_ops *fs_root_ops;
 void fs_cli_init(void);
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/fs/nffs/include/nffs/nffs.h
----------------------------------------------------------------------
diff --git a/fs/nffs/include/nffs/nffs.h b/fs/nffs/include/nffs/nffs.h
index 4a608cb..4099e14 100644
--- a/fs/nffs/include/nffs/nffs.h
+++ b/fs/nffs/include/nffs/nffs.h
@@ -24,6 +24,10 @@
 #include <inttypes.h>
 #include "fs/fs.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define NFFS_FILENAME_MAX_LEN   256  /* Does not require null terminator. */
 #define NFFS_MAX_AREAS          256
 
@@ -61,4 +65,8 @@ int nffs_format(const struct nffs_area_desc *area_descs);
 
 int nffs_misc_desc_from_flash_area(int idx, int *cnt, struct nffs_area_desc 
*nad);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/fs/nffs/include/nffs/nffs_test.h
----------------------------------------------------------------------
diff --git a/fs/nffs/include/nffs/nffs_test.h b/fs/nffs/include/nffs/nffs_test.h
index cee58bb..3cc0747 100644
--- a/fs/nffs/include/nffs/nffs_test.h
+++ b/fs/nffs/include/nffs/nffs_test.h
@@ -20,6 +20,14 @@
 #ifndef H_NFFS_TEST_
 #define H_NFFS_TEST_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int nffs_test_all(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/fs/nffs/src/nffs_priv.h
----------------------------------------------------------------------
diff --git a/fs/nffs/src/nffs_priv.h b/fs/nffs/src/nffs_priv.h
index 27c284b..360194d 100644
--- a/fs/nffs/src/nffs_priv.h
+++ b/fs/nffs/src/nffs_priv.h
@@ -29,6 +29,10 @@
 #include "crc/crc16.h"
 #include "stats/stats.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define NFFS_HASH_SIZE               256
 
 #define NFFS_ID_DIR_MIN              0
@@ -516,4 +520,8 @@ int nffs_write_to_file(struct nffs_file *file, const void 
*data, int len);
     LOG_ ## lvl(&nffs_log, LOG_MODULE_NFFS, __VA_ARGS__)
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/fs/nffs/test/src/arch/sim/nffs_test_priv.h
----------------------------------------------------------------------
diff --git a/fs/nffs/test/src/arch/sim/nffs_test_priv.h 
b/fs/nffs/test/src/arch/sim/nffs_test_priv.h
index a3508c1..e0b7ff0 100644
--- a/fs/nffs/test/src/arch/sim/nffs_test_priv.h
+++ b/fs/nffs/test/src/arch/sim/nffs_test_priv.h
@@ -20,6 +20,10 @@
 #ifndef H_NFFS_TEST_PRIV_
 #define H_NFFS_TEST_PRIV_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct nffs_test_block_desc {
     const char *data;
     int data_len;
@@ -38,5 +42,9 @@ int nffs_test(void);
 extern const struct nffs_test_file_desc *nffs_test_system_01;
 extern const struct nffs_test_file_desc *nffs_test_system_01_rm_1014_mk10;
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/bsp/arduino_primo_nrf52/include/bsp/nrf_drv_config.h
----------------------------------------------------------------------
diff --git a/hw/bsp/arduino_primo_nrf52/include/bsp/nrf_drv_config.h 
b/hw/bsp/arduino_primo_nrf52/include/bsp/nrf_drv_config.h
index d90fc99..643d968 100644
--- a/hw/bsp/arduino_primo_nrf52/include/bsp/nrf_drv_config.h
+++ b/hw/bsp/arduino_primo_nrf52/include/bsp/nrf_drv_config.h
@@ -13,6 +13,10 @@
 #ifndef NRF_DRV_CONFIG_H
 #define NRF_DRV_CONFIG_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * Provide a non-zero value here in applications that need to use several
  * peripherals with the same ID that are sharing certain resources
@@ -461,4 +465,8 @@
 
 #include "nrf_drv_config_validation.h"
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF_DRV_CONFIG_H

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/bsp/bmd300eval/include/bsp/nrf_drv_config.h
----------------------------------------------------------------------
diff --git a/hw/bsp/bmd300eval/include/bsp/nrf_drv_config.h 
b/hw/bsp/bmd300eval/include/bsp/nrf_drv_config.h
index 653a4de..5341c32 100644
--- a/hw/bsp/bmd300eval/include/bsp/nrf_drv_config.h
+++ b/hw/bsp/bmd300eval/include/bsp/nrf_drv_config.h
@@ -13,6 +13,10 @@
 #ifndef NRF_DRV_CONFIG_H
 #define NRF_DRV_CONFIG_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * Provide a non-zero value here in applications that need to use several
  * peripherals with the same ID that are sharing certain resources
@@ -460,4 +464,8 @@
 
 #include "nrf_drv_config_validation.h"
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF_DRV_CONFIG_H

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/bsp/native/include/bsp/bsp_sysid.h
----------------------------------------------------------------------
diff --git a/hw/bsp/native/include/bsp/bsp_sysid.h 
b/hw/bsp/native/include/bsp/bsp_sysid.h
index b9094c2..c102f09 100644
--- a/hw/bsp/native/include/bsp/bsp_sysid.h
+++ b/hw/bsp/native/include/bsp/bsp_sysid.h
@@ -19,6 +19,10 @@
 #ifndef __NATIVE_BSP_SYSID_H
 #define __NATIVE_BSP_SYSID_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* This file defines the system device descriptors for this BSP.
  * System device descriptors are any HAL devies */
 
@@ -45,4 +49,8 @@ enum system_device_id {
     /* TODO -- add other hals here */    
 };
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif  /* __NATIVE_BSP_SYSID_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/bsp/nrf51-arduino_101/include/bsp/nrf_drv_config.h
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51-arduino_101/include/bsp/nrf_drv_config.h 
b/hw/bsp/nrf51-arduino_101/include/bsp/nrf_drv_config.h
index f97fb5c..d111ac3 100644
--- a/hw/bsp/nrf51-arduino_101/include/bsp/nrf_drv_config.h
+++ b/hw/bsp/nrf51-arduino_101/include/bsp/nrf_drv_config.h
@@ -13,6 +13,10 @@
 #ifndef NRF_DRV_CONFIG_H
 #define NRF_DRV_CONFIG_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * Provide a non-zero value here in applications that need to use several
  * peripherals with the same ID that are sharing certain resources
@@ -463,4 +467,8 @@
 
 #include "nrf_drv_config_validation.h"
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF_DRV_CONFIG_H

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/bsp/nrf51-blenano/include/bsp/nrf_drv_config.h
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51-blenano/include/bsp/nrf_drv_config.h 
b/hw/bsp/nrf51-blenano/include/bsp/nrf_drv_config.h
index feac50b..187bbb1 100644
--- a/hw/bsp/nrf51-blenano/include/bsp/nrf_drv_config.h
+++ b/hw/bsp/nrf51-blenano/include/bsp/nrf_drv_config.h
@@ -13,6 +13,10 @@
 #ifndef NRF_DRV_CONFIG_H
 #define NRF_DRV_CONFIG_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * Provide a non-zero value here in applications that need to use several
  * peripherals with the same ID that are sharing certain resources
@@ -461,4 +465,8 @@
 
 #include "nrf_drv_config_validation.h"
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF_DRV_CONFIG_H

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/bsp/nrf51dk-16kbram/include/bsp/bsp_sysid.h
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51dk-16kbram/include/bsp/bsp_sysid.h 
b/hw/bsp/nrf51dk-16kbram/include/bsp/bsp_sysid.h
index 7b0a24b..63959e5 100644
--- a/hw/bsp/nrf51dk-16kbram/include/bsp/bsp_sysid.h
+++ b/hw/bsp/nrf51dk-16kbram/include/bsp/bsp_sysid.h
@@ -33,4 +33,5 @@ enum system_device_id
 }
 #endif
 
-#endif /* BSP_SYSID_H */
\ No newline at end of file
+#endif /* BSP_SYSID_H */
+

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/bsp/nrf51dk-16kbram/include/bsp/nrf_drv_config.h
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51dk-16kbram/include/bsp/nrf_drv_config.h 
b/hw/bsp/nrf51dk-16kbram/include/bsp/nrf_drv_config.h
index f97fb5c..d111ac3 100644
--- a/hw/bsp/nrf51dk-16kbram/include/bsp/nrf_drv_config.h
+++ b/hw/bsp/nrf51dk-16kbram/include/bsp/nrf_drv_config.h
@@ -13,6 +13,10 @@
 #ifndef NRF_DRV_CONFIG_H
 #define NRF_DRV_CONFIG_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * Provide a non-zero value here in applications that need to use several
  * peripherals with the same ID that are sharing certain resources
@@ -463,4 +467,8 @@
 
 #include "nrf_drv_config_validation.h"
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF_DRV_CONFIG_H

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/bsp/nrf51dk/include/bsp/nrf_drv_config.h
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51dk/include/bsp/nrf_drv_config.h 
b/hw/bsp/nrf51dk/include/bsp/nrf_drv_config.h
index feac50b..187bbb1 100644
--- a/hw/bsp/nrf51dk/include/bsp/nrf_drv_config.h
+++ b/hw/bsp/nrf51dk/include/bsp/nrf_drv_config.h
@@ -13,6 +13,10 @@
 #ifndef NRF_DRV_CONFIG_H
 #define NRF_DRV_CONFIG_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * Provide a non-zero value here in applications that need to use several
  * peripherals with the same ID that are sharing certain resources
@@ -461,4 +465,8 @@
 
 #include "nrf_drv_config_validation.h"
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF_DRV_CONFIG_H

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/bsp/nrf52dk/include/bsp/nrf_drv_config.h
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf52dk/include/bsp/nrf_drv_config.h 
b/hw/bsp/nrf52dk/include/bsp/nrf_drv_config.h
index 653a4de..5341c32 100644
--- a/hw/bsp/nrf52dk/include/bsp/nrf_drv_config.h
+++ b/hw/bsp/nrf52dk/include/bsp/nrf_drv_config.h
@@ -13,6 +13,10 @@
 #ifndef NRF_DRV_CONFIG_H
 #define NRF_DRV_CONFIG_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * Provide a non-zero value here in applications that need to use several
  * peripherals with the same ID that are sharing certain resources
@@ -460,4 +464,8 @@
 
 #include "nrf_drv_config_validation.h"
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // NRF_DRV_CONFIG_H

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/cmsis-core/src/ext/core_caFunc.h
----------------------------------------------------------------------
diff --git a/hw/cmsis-core/src/ext/core_caFunc.h 
b/hw/cmsis-core/src/ext/core_caFunc.h
index 3f40094..255c683 100644
--- a/hw/cmsis-core/src/ext/core_caFunc.h
+++ b/hw/cmsis-core/src/ext/core_caFunc.h
@@ -39,6 +39,10 @@
 #define __CORE_CAFUNC_H__
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* ###########################  Core Function Access  
########################### */
 /** \ingroup  CMSIS_Core_FunctionInterface
     \defgroup CMSIS_Core_RegAccFunctions CMSIS Core Register Access Functions
@@ -1158,4 +1162,8 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE void 
__v7_clean_inv_dcache_al
 /*@} end of CMSIS_Core_RegAccFunctions */
 
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __CORE_CAFUNC_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/cmsis-core/src/ext/core_caInstr.h
----------------------------------------------------------------------
diff --git a/hw/cmsis-core/src/ext/core_caInstr.h 
b/hw/cmsis-core/src/ext/core_caInstr.h
index b1d3435..41c4938 100644
--- a/hw/cmsis-core/src/ext/core_caInstr.h
+++ b/hw/cmsis-core/src/ext/core_caInstr.h
@@ -37,9 +37,17 @@
 #ifndef __CORE_CAINSTR_H__
 #define __CORE_CAINSTR_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define __CORTEX_M 0x3
 #include "core_cmInstr.h"
 #undef  __CORTEX_M
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/cmsis-core/src/ext/core_cmFunc.h
----------------------------------------------------------------------
diff --git a/hw/cmsis-core/src/ext/core_cmFunc.h 
b/hw/cmsis-core/src/ext/core_cmFunc.h
index 0a18faf..a2c5ad9 100644
--- a/hw/cmsis-core/src/ext/core_cmFunc.h
+++ b/hw/cmsis-core/src/ext/core_cmFunc.h
@@ -39,6 +39,10 @@
 #define __CORE_CMFUNC_H
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* ###########################  Core Function Access  
########################### */
 /** \ingroup  CMSIS_Core_FunctionInterface
     \defgroup CMSIS_Core_RegAccFunctions CMSIS Core Register Access Functions
@@ -633,4 +637,8 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE void 
__set_FPSCR(uint32_t fps
 /*@} end of CMSIS_Core_RegAccFunctions */
 
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __CORE_CMFUNC_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/cmsis-core/src/ext/core_cmInstr.h
----------------------------------------------------------------------
diff --git a/hw/cmsis-core/src/ext/core_cmInstr.h 
b/hw/cmsis-core/src/ext/core_cmInstr.h
index d213f0e..544f97d 100644
--- a/hw/cmsis-core/src/ext/core_cmInstr.h
+++ b/hw/cmsis-core/src/ext/core_cmInstr.h
@@ -39,6 +39,10 @@
 #define __CORE_CMINSTR_H
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* ##########################  Core Instruction Access  
######################### */
 /** \defgroup CMSIS_Core_InstructionInterface CMSIS Core Instruction Interface
   Access to dedicated instructions
@@ -685,4 +689,8 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint8_t 
__CLZ(uint32_t value)
 
 /*@}*/ /* end of group CMSIS_Core_InstructionInterface */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __CORE_CMINSTR_H */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/drivers/adc/adc_nrf51/include/adc_nrf51/adc_nrf51.h
----------------------------------------------------------------------
diff --git a/hw/drivers/adc/adc_nrf51/include/adc_nrf51/adc_nrf51.h 
b/hw/drivers/adc/adc_nrf51/include/adc_nrf51/adc_nrf51.h
index 0006b89..e70ac88 100644
--- a/hw/drivers/adc/adc_nrf51/include/adc_nrf51/adc_nrf51.h
+++ b/hw/drivers/adc/adc_nrf51/include/adc_nrf51/adc_nrf51.h
@@ -25,6 +25,14 @@
 #include <nrf.h>
 #include <nrf_adc.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int nrf51_adc_dev_init(struct os_dev *, void *);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __ADC_NRF51_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/drivers/adc/adc_nrf52/include/adc_nrf52/adc_nrf52.h
----------------------------------------------------------------------
diff --git a/hw/drivers/adc/adc_nrf52/include/adc_nrf52/adc_nrf52.h 
b/hw/drivers/adc/adc_nrf52/include/adc_nrf52/adc_nrf52.h
index f356f89..5325d96 100644
--- a/hw/drivers/adc/adc_nrf52/include/adc_nrf52/adc_nrf52.h
+++ b/hw/drivers/adc/adc_nrf52/include/adc_nrf52/adc_nrf52.h
@@ -25,6 +25,14 @@
 #include <nrf.h>
 #include <nrf_saadc.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int nrf52_adc_dev_init(struct os_dev *, void *);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __ADC_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/drivers/adc/adc_stm32f4/include/adc_stm32f4/adc_stm32f4.h
----------------------------------------------------------------------
diff --git a/hw/drivers/adc/adc_stm32f4/include/adc_stm32f4/adc_stm32f4.h 
b/hw/drivers/adc/adc_stm32f4/include/adc_stm32f4/adc_stm32f4.h
index 31f0bb4..51596a7 100644
--- a/hw/drivers/adc/adc_stm32f4/include/adc_stm32f4/adc_stm32f4.h
+++ b/hw/drivers/adc/adc_stm32f4/include/adc_stm32f4/adc_stm32f4.h
@@ -22,6 +22,10 @@
 
 #include <adc/adc.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Mynewt HAL Port pin mapping */
 #define ADC123_CH0_PIN    0
 #define ADC123_CH1_PIN    1
@@ -59,4 +63,8 @@ struct stm32f4_adc_dev_cfg {
 
 int stm32f4_adc_dev_init(struct os_dev *, void *);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __ADC_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/drivers/adc/include/adc/adc.h
----------------------------------------------------------------------
diff --git a/hw/drivers/adc/include/adc/adc.h b/hw/drivers/adc/include/adc/adc.h
index 2ffb6cd..ad1ab7d 100644
--- a/hw/drivers/adc/include/adc/adc.h
+++ b/hw/drivers/adc/include/adc/adc.h
@@ -22,6 +22,10 @@
 
 #include <os/os_dev.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct adc_dev;
 
 /**
@@ -274,4 +278,8 @@ adc_result_mv(struct adc_dev *dev, uint8_t cnum, int val)
     return (ret);
 }
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __ADC_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/drivers/nimble/native/include/ble/xcvr.h
----------------------------------------------------------------------
diff --git a/hw/drivers/nimble/native/include/ble/xcvr.h 
b/hw/drivers/nimble/native/include/ble/xcvr.h
index 54b580c..c765a6a 100644
--- a/hw/drivers/nimble/native/include/ble/xcvr.h
+++ b/hw/drivers/nimble/native/include/ble/xcvr.h
@@ -20,6 +20,10 @@
 #ifndef H_BLE_XCVR_
 #define H_BLE_XCVR_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Transceiver specific defintions */
 #define XCVR_RX_START_DELAY_USECS     (140)
 #define XCVR_TX_START_DELAY_USECS     (140)
@@ -35,4 +39,8 @@
  */
 #define BLE_HW_WHITE_LIST_SIZE        (0)
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* H_BLE_XCVR_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/drivers/nimble/nrf51/include/ble/xcvr.h
----------------------------------------------------------------------
diff --git a/hw/drivers/nimble/nrf51/include/ble/xcvr.h 
b/hw/drivers/nimble/nrf51/include/ble/xcvr.h
index 7041d8d..c4425d2 100644
--- a/hw/drivers/nimble/nrf51/include/ble/xcvr.h
+++ b/hw/drivers/nimble/nrf51/include/ble/xcvr.h
@@ -20,6 +20,10 @@
 #ifndef H_BLE_XCVR_
 #define H_BLE_XCVR_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Transceiver specific defintions */
 #define XCVR_RX_START_DELAY_USECS     (140)
 #define XCVR_TX_START_DELAY_USECS     (140)
@@ -35,4 +39,8 @@
  */
 #define BLE_HW_WHITE_LIST_SIZE        (8)
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* H_BLE_XCVR_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/drivers/nimble/nrf52/include/ble/xcvr.h
----------------------------------------------------------------------
diff --git a/hw/drivers/nimble/nrf52/include/ble/xcvr.h 
b/hw/drivers/nimble/nrf52/include/ble/xcvr.h
index a05a0c7..a3e31c0 100644
--- a/hw/drivers/nimble/nrf52/include/ble/xcvr.h
+++ b/hw/drivers/nimble/nrf52/include/ble/xcvr.h
@@ -20,6 +20,10 @@
 #ifndef H_BLE_XCVR_
 #define H_BLE_XCVR_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Transceiver specific definitions */
 #define XCVR_RX_START_DELAY_USECS     (140)
 #define XCVR_TX_START_DELAY_USECS     (140)
@@ -35,4 +39,8 @@
  */
 #define BLE_HW_WHITE_LIST_SIZE        (8)
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* H_BLE_XCVR_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/drivers/uart/include/uart/uart.h
----------------------------------------------------------------------
diff --git a/hw/drivers/uart/include/uart/uart.h 
b/hw/drivers/uart/include/uart/uart.h
index e889722..442518d 100644
--- a/hw/drivers/uart/include/uart/uart.h
+++ b/hw/drivers/uart/include/uart/uart.h
@@ -23,6 +23,10 @@
 #include <inttypes.h>
 #include <os/os_dev.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct uart_dev;
 
 /*
@@ -136,4 +140,8 @@ uart_blocking_tx(struct uart_dev *dev, uint8_t byte)
     dev->ud_funcs.uf_blocking_tx(dev, byte);
 }
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __DRIVERS_UART_H_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/drivers/uart/uart_bitbang/include/uart_bitbang/uart_bitbang.h
----------------------------------------------------------------------
diff --git a/hw/drivers/uart/uart_bitbang/include/uart_bitbang/uart_bitbang.h 
b/hw/drivers/uart/uart_bitbang/include/uart_bitbang/uart_bitbang.h
index 23e2f80..3f6f2dd 100644
--- a/hw/drivers/uart/uart_bitbang/include/uart_bitbang/uart_bitbang.h
+++ b/hw/drivers/uart/uart_bitbang/include/uart_bitbang/uart_bitbang.h
@@ -20,6 +20,10 @@
 #ifndef __UART_BITBANG_H__
 #define __UART_BITBANG_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct uart_bitbang_conf {
     int ubc_rxpin;
     int ubc_txpin;
@@ -29,4 +33,8 @@ struct uart_bitbang_conf {
 struct os_dev;
 int uart_bitbang_init(struct os_dev *, void *);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __UART_BITBANG_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/drivers/uart/uart_hal/include/uart_hal/uart_hal.h
----------------------------------------------------------------------
diff --git a/hw/drivers/uart/uart_hal/include/uart_hal/uart_hal.h 
b/hw/drivers/uart/uart_hal/include/uart_hal/uart_hal.h
index 702e91d..f430d91 100644
--- a/hw/drivers/uart/uart_hal/include/uart_hal/uart_hal.h
+++ b/hw/drivers/uart/uart_hal/include/uart_hal/uart_hal.h
@@ -20,7 +20,15 @@
 #ifndef __DRIVERS_UART_HAL_H_
 #define __DRIVERS_UART_HAL_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct os_dev;
 int uart_hal_init(struct os_dev *, void *);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __DRIVERS_UART_HAL_H_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/hal/include/hal/hal_watchdog.h
----------------------------------------------------------------------
diff --git a/hw/hal/include/hal/hal_watchdog.h 
b/hw/hal/include/hal/hal_watchdog.h
index d84d932..141e99b 100644
--- a/hw/hal/include/hal/hal_watchdog.h
+++ b/hw/hal/include/hal/hal_watchdog.h
@@ -21,6 +21,10 @@
 #define _HAL_WATCHDOG_H_
 
 #include <stdint.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * Set a recurring watchdog timer to fire no sooner than in 'expire_secs'
  * seconds. Watchdog should be tickled periodically with a frequency
@@ -44,4 +48,8 @@ void hal_watchdog_enable(void);
  */
 void hal_watchdog_tickle(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _HAL_WATCHDOG_H_ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/native/include/mcu/mcu_sim.h
----------------------------------------------------------------------
diff --git a/hw/mcu/native/include/mcu/mcu_sim.h 
b/hw/mcu/native/include/mcu/mcu_sim.h
index 105ba9d..1b143ae 100644
--- a/hw/mcu/native/include/mcu/mcu_sim.h
+++ b/hw/mcu/native/include/mcu/mcu_sim.h
@@ -19,6 +19,10 @@
 #ifndef __MCU_SIM_H__
 #define __MCU_SIM_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define OS_TICKS_PER_SEC    (100)
 
 extern char *native_flash_file;
@@ -26,4 +30,8 @@ extern char *native_uart_log_file;
 
 void mcu_sim_parse_args(int argc, char **argv);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __MCU_SIM_H__ */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d69b0798/hw/mcu/native/include/mcu/native_bsp.h
----------------------------------------------------------------------
diff --git a/hw/mcu/native/include/mcu/native_bsp.h 
b/hw/mcu/native/include/mcu/native_bsp.h
index 9a4850f..0ed35da 100644
--- a/hw/mcu/native/include/mcu/native_bsp.h
+++ b/hw/mcu/native/include/mcu/native_bsp.h
@@ -19,6 +19,14 @@
 #ifndef H_NATIVE_BSP_
 #define H_NATIVE_BSP_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 extern const struct hal_flash native_flash_dev;
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* H_NATIVE_BSP_ */


Reply via email to