Openwear requires RC oscillator to be used

Fork of nRF51822 by Nordic Semiconductor

Files at this revision

API Documentation at this revision

Comitter:
Rohit Grover
Date:
Wed Jul 16 10:53:07 2014 +0100
Parent:
44:47da5c62e067
Child:
46:2bfbbe290083
Commit message:
add cplusplus guards for the cases where C files include the headers

Changed in this revision

nordic/nrf-sdk/app_common/app_gpiote.h Show annotated file Show diff for this revision Revisions of this file
nordic/nrf-sdk/app_common/app_timer.h Show annotated file Show diff for this revision Revisions of this file
nordic/nrf-sdk/app_common/crc16.h Show annotated file Show diff for this revision Revisions of this file
nordic/nrf-sdk/ble/ble_advdata.h Show annotated file Show diff for this revision Revisions of this file
nordic/nrf-sdk/ble/ble_conn_params.h Show annotated file Show diff for this revision Revisions of this file
nordic/nrf-sdk/sd_common/ble_stack_handler_types.h Show annotated file Show diff for this revision Revisions of this file
nordic/nrf-sdk/sd_common/softdevice_handler.h Show annotated file Show diff for this revision Revisions of this file
nordic/pstorage_platform.h Show annotated file Show diff for this revision Revisions of this file
--- a/nordic/nrf-sdk/app_common/app_gpiote.h	Fri Jul 11 13:53:30 2014 +0100
+++ b/nordic/nrf-sdk/app_common/app_gpiote.h	Wed Jul 16 10:53:07 2014 +0100
@@ -46,6 +46,10 @@
 #include "app_error.h"
 #include "app_util.h"
 
+#ifdef __cpluplus
+extern "C" {
+#endif
+
 #define GPIOTE_USER_NODE_SIZE   20          /**< Size of app_gpiote.gpiote_user_t (only for use inside APP_GPIOTE_BUF_SIZE()). */
 #define NO_OF_PINS              32          /**< Number of GPIO pins on the nRF51 chip. */
 
@@ -213,6 +217,9 @@
  */
 uint32_t app_gpiote_disable_interrupts(void);
 
+#ifdef __cpluplus
+}
+#endif
 
 #endif // APP_GPIOTE_H__
 
--- a/nordic/nrf-sdk/app_common/app_timer.h	Fri Jul 11 13:53:30 2014 +0100
+++ b/nordic/nrf-sdk/app_common/app_timer.h	Wed Jul 16 10:53:07 2014 +0100
@@ -49,6 +49,10 @@
 #include "app_scheduler.h"
 #include "compiler_abstraction.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif // #ifdef __cplusplus
+
 #define APP_TIMER_SCHED_EVT_SIZE     sizeof(app_timer_event_t)  /**< Size of button events being passed through the scheduler (is to be used for computing the maximum size of scheduler events). */
 #define APP_TIMER_CLOCK_FREQ         32768                      /**< Clock frequency of the RTC timer used to implement the app timer module. */
 #define APP_TIMER_MIN_TIMEOUT_TICKS  5                          /**< Minimum value of the timeout_ticks parameter of app_timer_start(). */
@@ -85,9 +89,9 @@
  *
  * @param[in]  MS          Milliseconds.
  * @param[in]  PRESCALER   Value of the RTC1 PRESCALER register (must be the same value that was
- *                         passed to APP_TIMER_INIT()). 
- * 
- * @note   When using this macro, it is the responsibility of the developer to ensure that the 
+ *                         passed to APP_TIMER_INIT()).
+ *
+ * @note   When using this macro, it is the responsibility of the developer to ensure that the
  *         values provided as input result in an output value that is supported by the
  *         @ref app_timer_start function. For example, when the ticks for 1 ms is needed, the
  *         maximum possible value of PRESCALER must be 6, when @ref APP_TIMER_CLOCK_FREQ is 32768.
@@ -122,11 +126,11 @@
  *          making sure that the buffer is correctly aligned. It will also connect the timer module
  *          to the scheduler (if specified).
  *
- * @note    This module assumes that the LFCLK is already running. If it isn't, the module will 
- *          be non-functional, since the RTC will not run. If you don't use a softdevice, you'll 
- *          have to start the LFCLK manually. See the rtc_example's \ref lfclk_config() function 
- *          for an example of how to do this. If you use a softdevice, the LFCLK is started on 
- *          softdevice init. 
+ * @note    This module assumes that the LFCLK is already running. If it isn't, the module will
+ *          be non-functional, since the RTC will not run. If you don't use a softdevice, you'll
+ *          have to start the LFCLK manually. See the rtc_example's \ref lfclk_config() function
+ *          for an example of how to do this. If you use a softdevice, the LFCLK is started on
+ *          softdevice init.
  *
  *
  * @param[in]  PRESCALER        Value of the RTC1 PRESCALER register. This will decide the
@@ -178,7 +182,7 @@
  * @retval     NRF_ERROR_INVALID_PARAM   Invalid parameter (buffer not aligned to a 4 byte
  *                                       boundary or NULL).
  */
-uint32_t app_timer_init(uint32_t                      prescaler, 
+uint32_t app_timer_init(uint32_t                      prescaler,
                         uint8_t                       max_timers,
                         uint8_t                       op_queues_size,
                         void *                        p_buffer,
@@ -278,7 +282,7 @@
 static __INLINE void app_timer_evt_get(void * p_event_data, uint16_t event_size)
 {
     app_timer_event_t * p_timer_event = (app_timer_event_t *)p_event_data;
-    
+
     APP_ERROR_CHECK_BOOL(event_size == sizeof(app_timer_event_t));
     p_timer_event->timeout_handler(p_timer_event->p_context);
 }
@@ -290,11 +294,15 @@
 
     timer_event.timeout_handler = timeout_handler;
     timer_event.p_context       = p_context;
-    
+
     return app_sched_event_put(&timer_event, sizeof(timer_event), app_timer_evt_get);
 }
 /**@endcond */
 
+#ifdef __cplusplus
+}
+#endif // #ifdef __cplusplus
+
 #endif // APP_TIMER_H__
 
 /** @} */
--- a/nordic/nrf-sdk/app_common/crc16.h	Fri Jul 11 13:53:30 2014 +0100
+++ b/nordic/nrf-sdk/app_common/crc16.h	Wed Jul 16 10:53:07 2014 +0100
@@ -9,7 +9,7 @@
  * the file.
  *
  */
- 
+
 /** @file
  *
  * @defgroup crc_compute CRC compute
@@ -18,26 +18,35 @@
  *
  * @brief    This module implements the CRC-16 calculation in the blocks.
  */
- 
+
 #ifndef CRC16_H__
 #define CRC16_H__
 
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief Function for calculating CRC-16 in blocks.
  *
- * Feed each consecutive data block into this function, along with the current value of p_crc as 
- * returned by the previous call of this function. The first call of this function should pass NULL 
+ * Feed each consecutive data block into this function, along with the current value of p_crc as
+ * returned by the previous call of this function. The first call of this function should pass NULL
  * as the initial value of the crc in p_crc.
  *
  * @param[in] p_data The input data block for computation.
  * @param[in] size   The size of the input data block in bytes.
- * @param[in] p_crc  The previous calculated CRC-16 value or NULL if first call.  
+ * @param[in] p_crc  The previous calculated CRC-16 value or NULL if first call.
  *
  * @return The updated CRC-16 value, based on the input supplied.
  */
 uint16_t crc16_compute(const uint8_t * p_data, uint32_t size, const uint16_t * p_crc);
 
+#ifdef __cplusplus
+}
+#endif
+
+
 #endif // CRC16_H__
- 
+
 /** @} */
--- a/nordic/nrf-sdk/ble/ble_advdata.h	Fri Jul 11 13:53:30 2014 +0100
+++ b/nordic/nrf-sdk/ble/ble_advdata.h	Wed Jul 16 10:53:07 2014 +0100
@@ -28,6 +28,10 @@
 #include "ble.h"
 #include "app_util.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**@brief Advertising data name type. This contains the options available for the device name inside
  *        the advertising data. */
 typedef enum
@@ -100,14 +104,18 @@
  * @warning This API may override application's request to use the long name and use a short name
  * instead. This truncation will occur in case the long name does not fit advertisement data size.
  * Application is permitted to specify a preferred short name length in case truncation is required.
- * For example, if the complete device name is ABCD_HRMonitor, application can specify short name 
+ * For example, if the complete device name is ABCD_HRMonitor, application can specify short name
  * length to 8 such that short device name appears as ABCD_HRM instead of ABCD_HRMo or ABCD_HRMoni
  * etc if available size for short name is 9 or 12 respectively to have more apporpriate short name.
  * However, it should be noted that this is just a preference that application can specify and
- * if the preference too large to fit in Advertisement Data, this can be further truncated. 
+ * if the preference too large to fit in Advertisement Data, this can be further truncated.
  */
 uint32_t ble_advdata_set(const ble_advdata_t * p_advdata, const ble_advdata_t * p_srdata);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // BLE_ADVDATA_H__
 
 /** @} */
--- a/nordic/nrf-sdk/ble/ble_conn_params.h	Fri Jul 11 13:53:30 2014 +0100
+++ b/nordic/nrf-sdk/ble/ble_conn_params.h	Wed Jul 16 10:53:07 2014 +0100
@@ -25,6 +25,10 @@
 #include "ble.h"
 #include "ble_srv_common.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif // #ifdef __cplusplus
+
 /**@brief Connection Parameters Module event type. */
 typedef enum
 {
@@ -58,7 +62,7 @@
 
 /**@brief Function for initializing the Connection Parameters module.
  *
- * @note If the negotiation procedure should be triggered when notification/indication of 
+ * @note If the negotiation procedure should be triggered when notification/indication of
  *       any characteristic is enabled by the peer, then this function must be called after
  *       having initialized the services.
  *
@@ -83,7 +87,7 @@
 
 /**@brief Function for changing the current connection parameters to a new set.
  *
- *  @details Use this function to change the connection parameters to a new set of parameter 
+ *  @details Use this function to change the connection parameters to a new set of parameter
  *       (ie different from the ones given at init of the module).
  *       This function is usefull for scenario where most of the time the application
  *       needs a relatively big connection interval, and just sometimes, for a temporary
@@ -109,3 +113,7 @@
 #endif // BLE_CONN_PARAMS_H__
 
 /** @} */
+
+#ifdef __cplusplus
+}
+#endif // #ifdef __cplusplus
--- a/nordic/nrf-sdk/sd_common/ble_stack_handler_types.h	Fri Jul 11 13:53:30 2014 +0100
+++ b/nordic/nrf-sdk/sd_common/ble_stack_handler_types.h	Wed Jul 16 10:53:07 2014 +0100
@@ -31,6 +31,10 @@
 #include "app_scheduler.h"
 #include "app_util.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif // #ifdef __cplusplus
+
 #define BLE_STACK_EVT_MSG_BUF_SIZE       (sizeof(ble_evt_t) + (GATT_MTU_SIZE_DEFAULT))     /**< Size of BLE event message buffer. This will be provided to the SoftDevice while fetching an event. */
 #define BLE_STACK_HANDLER_SCHED_EVT_SIZE 0                                                 /**< The size of the scheduler event used by SoftDevice handler when passing BLE events using the @ref app_scheduler. */
 
@@ -60,6 +64,10 @@
 
 #endif // BLE_STACK_SUPPORT_REQD
 
+#ifdef __cplusplus
+}
+#endif // #ifdef __cplusplus
+
 #endif // BLE_STACK_HANDLER_TYPES_H__
 
 /** @} */
--- a/nordic/nrf-sdk/sd_common/softdevice_handler.h	Fri Jul 11 13:53:30 2014 +0100
+++ b/nordic/nrf-sdk/sd_common/softdevice_handler.h	Wed Jul 16 10:53:07 2014 +0100
@@ -41,6 +41,10 @@
 #include "ble_stack_handler_types.h"
 #include "ant_stack_handler_types.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif // #ifdef __cplusplus
+
 #define SOFTDEVICE_SCHED_EVT_SIZE       0                                                 /**< Size of button events being passed through the scheduler (is to be used for computing the maximum size of scheduler events). For SoftDevice events, this size is 0, since the events are being pulled in the event handler. */
 #define SYS_EVT_MSG_BUF_SIZE            sizeof(uint32_t)                                  /**< Size of System (SOC) event message buffer. */
 
@@ -160,6 +164,10 @@
 }
 /**@endcond */
 
+#ifdef __cplusplus
+}
+#endif // #ifdef __cplusplus
+
 #endif // SOFTDEVICE_HANDLER_H__
 
 /** @} */
--- a/nordic/pstorage_platform.h	Fri Jul 11 13:53:30 2014 +0100
+++ b/nordic/pstorage_platform.h	Wed Jul 16 10:53:07 2014 +0100
@@ -22,6 +22,10 @@
 #include <stdint.h>
 #include "nordic_global.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif // #ifdef __cplusplus
+
 #define PSTORAGE_FLASH_PAGE_SIZE    ((uint16_t)NRF_FICR->CODEPAGESIZE)   /**< Size of one flash page. */
 #define PSTORAGE_FLASH_EMPTY_MASK    0xFFFFFFFF                          /**< Bit mask that defines an empty address in flash. */
 
@@ -56,6 +60,10 @@
 /**@brief Handles Flash Access Result Events. To be called in the system event dispatcher of the application. */
 void pstorage_sys_event_handler (uint32_t sys_evt);
 
+#ifdef __cplusplus
+}
+#endif // #ifdef __cplusplus
+
 #endif // PSTORAGE_PL_H__
 
 /** @} */