Copy over coresponding files from nordic-sdk 9.0.0

This commit is contained in:
Liyou Zhou 2015-12-11 12:07:45 +00:00
parent c882164713
commit 9251259fa8
98 changed files with 3128 additions and 4120 deletions

View File

@ -38,7 +38,6 @@
"source/nordic_sdk/components/libraries/hci", "source/nordic_sdk/components/libraries/hci",
"source/nordic_sdk/components/libraries/scheduler", "source/nordic_sdk/components/libraries/scheduler",
"source/nordic_sdk/components/libraries/timer", "source/nordic_sdk/components/libraries/timer",
"source/nordic_sdk/components/libraries/trace",
"source/nordic_sdk/components/libraries/util", "source/nordic_sdk/components/libraries/util",
"source/nordic_sdk/components/softdevice/common/softdevice_handler", "source/nordic_sdk/components/softdevice/common/softdevice_handler",
"source/nordic_sdk/components/softdevice/s130/headers", "source/nordic_sdk/components/softdevice/s130/headers",

View File

@ -1,33 +1,12 @@
/* /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
#include "ble_radio_notification.h" #include "ble_radio_notification.h"

View File

@ -1,33 +1,12 @@
/* /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/** @file /** @file

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
#include "ble_dfu.h" #include "ble_dfu.h"

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/**@file /**@file
@ -111,8 +91,8 @@ typedef enum
*/ */
typedef struct typedef struct
{ {
uint8_t len; /**< Length of the packet received. */
uint8_t * p_data; /**< Pointer to the received packet. This will point to a word aligned memory location.*/ uint8_t * p_data; /**< Pointer to the received packet. This will point to a word aligned memory location.*/
uint8_t len; /**< Length of the packet received. */
} ble_dfu_pkt_write_t; } ble_dfu_pkt_write_t;
/**@brief Packet receipt notification request structure. /**@brief Packet receipt notification request structure.

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
#include "ble_advdata.h" #include "ble_advdata.h"

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/** @file /** @file

View File

@ -1,35 +1,3 @@
/*
* Copyright (c) Nordic Semiconductor ASA
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#include "ble_advdata_parser.h" #include "ble_advdata_parser.h"
uint32_t ble_advdata_parser_field_find(uint8_t type, uint32_t ble_advdata_parser_field_find(uint8_t type,

View File

@ -1,35 +1,3 @@
/*
* Copyright (c) Nordic Semiconductor ASA
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef BLE_ADVDATA_PARSER_H_ #ifndef BLE_ADVDATA_PARSER_H_
#define BLE_ADVDATA_PARSER_H_ #define BLE_ADVDATA_PARSER_H_

View File

@ -1,32 +1,12 @@
/* /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA
* All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without modification, * The information contained herein is property of Nordic Semiconductor ASA.
* are permitted provided that the following conditions are met: * Terms and conditions of usage are described in detail in NORDIC
* SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* *
* 1. Redistributions of source code must retain the above copyright notice, this * Licensees are granted free, non-transferable use of the information. NO
* list of conditions and the following disclaimer. * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* * the file.
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*/ */
@ -34,25 +14,17 @@
#include <stdlib.h> #include <stdlib.h>
#include "nordic_common.h" #include "nordic_common.h"
#include "ble_hci.h" #include "ble_hci.h"
#include "app_timer.h"
#include "ble_srv_common.h" #include "ble_srv_common.h"
#include "app_util.h" #include "app_util.h"
#ifdef USE_APP_TIMER
#include "app_timer.h"
#else
#include "mbed.h"
#endif
static ble_conn_params_init_t m_conn_params_config; /**< Configuration as specified by the application. */ static ble_conn_params_init_t m_conn_params_config; /**< Configuration as specified by the application. */
static ble_gap_conn_params_t m_preferred_conn_params; /**< Connection parameters preferred by the application. */ static ble_gap_conn_params_t m_preferred_conn_params; /**< Connection parameters preferred by the application. */
static uint8_t m_update_count; /**< Number of Connection Parameter Update messages that has currently been sent. */ static uint8_t m_update_count; /**< Number of Connection Parameter Update messages that has currently been sent. */
static uint16_t m_conn_handle; /**< Current connection handle. */ static uint16_t m_conn_handle; /**< Current connection handle. */
static ble_gap_conn_params_t m_current_conn_params; /**< Connection parameters received in the most recent Connect event. */ static ble_gap_conn_params_t m_current_conn_params; /**< Connection parameters received in the most recent Connect event. */
#ifdef USE_APP_TIMER
static app_timer_id_t m_conn_params_timer_id; /**< Connection parameters timer. */ static app_timer_id_t m_conn_params_timer_id; /**< Connection parameters timer. */
#else
static Ticker m_conn_params_timer;
#endif
static bool m_change_param = false; static bool m_change_param = false;
@ -76,16 +48,10 @@ static bool is_conn_params_ok(ble_gap_conn_params_t * p_conn_params)
} }
#ifdef USE_APP_TIMER
static void update_timeout_handler(void * p_context) static void update_timeout_handler(void * p_context)
{ {
UNUSED_PARAMETER(p_context); UNUSED_PARAMETER(p_context);
#else /* #if !USE_APP_TIMER */
static void update_timeout_handler(void)
{
m_conn_params_timer.detach(); /* this is supposed to be a single-shot timer callback */
#endif /* #if !USE_APP_TIMER */
if (m_conn_handle != BLE_CONN_HANDLE_INVALID) if (m_conn_handle != BLE_CONN_HANDLE_INVALID)
{ {
// Check if we have reached the maximum number of attempts // Check if we have reached the maximum number of attempts
@ -160,24 +126,15 @@ uint32_t ble_conn_params_init(const ble_conn_params_init_t * p_init)
m_conn_handle = BLE_CONN_HANDLE_INVALID; m_conn_handle = BLE_CONN_HANDLE_INVALID;
m_update_count = 0; m_update_count = 0;
#ifdef USE_APP_TIMER
return app_timer_create(&m_conn_params_timer_id, return app_timer_create(&m_conn_params_timer_id,
APP_TIMER_MODE_SINGLE_SHOT, APP_TIMER_MODE_SINGLE_SHOT,
update_timeout_handler); update_timeout_handler);
#else
return NRF_SUCCESS;
#endif
} }
uint32_t ble_conn_params_stop(void) uint32_t ble_conn_params_stop(void)
{ {
#ifdef USE_APP_TIMER
return app_timer_stop(m_conn_params_timer_id); return app_timer_stop(m_conn_params_timer_id);
#else /* #if !USE_APP_TIMER */
m_conn_params_timer.detach();
return NRF_SUCCESS;
#endif /* #if !USE_APP_TIMER */
} }
@ -186,9 +143,7 @@ static void conn_params_negotiation(void)
// Start negotiation if the received connection parameters are not acceptable // Start negotiation if the received connection parameters are not acceptable
if (!is_conn_params_ok(&m_current_conn_params)) if (!is_conn_params_ok(&m_current_conn_params))
{ {
#ifdef USE_APP_TIMER
uint32_t err_code; uint32_t err_code;
#endif
uint32_t timeout_ticks; uint32_t timeout_ticks;
if (m_change_param) if (m_change_param)
@ -214,15 +169,11 @@ static void conn_params_negotiation(void)
timeout_ticks = m_conn_params_config.next_conn_params_update_delay; timeout_ticks = m_conn_params_config.next_conn_params_update_delay;
} }
#ifdef USE_APP_TIMER
err_code = app_timer_start(m_conn_params_timer_id, timeout_ticks, NULL); err_code = app_timer_start(m_conn_params_timer_id, timeout_ticks, NULL);
if ((err_code != NRF_SUCCESS) && (m_conn_params_config.error_handler != NULL)) if ((err_code != NRF_SUCCESS) && (m_conn_params_config.error_handler != NULL))
{ {
m_conn_params_config.error_handler(err_code); m_conn_params_config.error_handler(err_code);
} }
#else
m_conn_params_timer.attach(update_timeout_handler, timeout_ticks / 32768);
#endif
} }
} }
else else
@ -257,24 +208,18 @@ static void on_connect(ble_evt_t * p_ble_evt)
static void on_disconnect(ble_evt_t * p_ble_evt) static void on_disconnect(ble_evt_t * p_ble_evt)
{ {
#ifdef USE_APP_TIMER
uint32_t err_code; uint32_t err_code;
#endif
m_conn_handle = BLE_CONN_HANDLE_INVALID; m_conn_handle = BLE_CONN_HANDLE_INVALID;
// Stop timer if running // Stop timer if running
m_update_count = 0; // Connection parameters updates should happen during every connection m_update_count = 0; // Connection parameters updates should happen during every connection
#ifdef USE_APP_TIMER
err_code = app_timer_stop(m_conn_params_timer_id); err_code = app_timer_stop(m_conn_params_timer_id);
if ((err_code != NRF_SUCCESS) && (m_conn_params_config.error_handler != NULL)) if ((err_code != NRF_SUCCESS) && (m_conn_params_config.error_handler != NULL))
{ {
m_conn_params_config.error_handler(err_code); m_conn_params_config.error_handler(err_code);
} }
#else
m_conn_params_timer.detach();
#endif
} }
@ -297,7 +242,6 @@ static void on_write(ble_evt_t * p_ble_evt)
} }
else else
{ {
#ifdef USE_APP_TIMER
uint32_t err_code; uint32_t err_code;
// Stop timer if running // Stop timer if running
@ -306,9 +250,6 @@ static void on_write(ble_evt_t * p_ble_evt)
{ {
m_conn_params_config.error_handler(err_code); m_conn_params_config.error_handler(err_code);
} }
#else /* #if !USE_APP_TIMER */
m_conn_params_timer.detach();
#endif /* #if !USE_APP_TIMER */
} }
} }
} }
@ -349,6 +290,7 @@ void ble_conn_params_on_ble_evt(ble_evt_t * p_ble_evt)
} }
} }
uint32_t ble_conn_params_change_conn_params(ble_gap_conn_params_t * new_params) uint32_t ble_conn_params_change_conn_params(ble_gap_conn_params_t * new_params)
{ {
uint32_t err_code; uint32_t err_code;

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/** @file /** @file

View File

@ -1,34 +1,13 @@
/* /* Copyright (c) 2011 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* */
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* Attention! /* Attention!
* To maintain compliance with Nordic Semiconductor ASAs Bluetooth profile * To maintain compliance with Nordic Semiconductor ASAs Bluetooth profile

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/* Attention! /* Attention!

View File

@ -1,37 +1,17 @@
/* /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/* Attention! /* Attention!
* To maintain compliance with Nordic Semiconductor ASAs Bluetooth profile * To maintain compliance with Nordic Semiconductor ASAs Bluetooth profile
* qualification listings, this section of source code must not be modified. * qualification listings, this section of source code must not be modified.
*/ */
@ -39,7 +19,7 @@
#include <string.h> #include <string.h>
#include "nordic_common.h" #include "nordic_common.h"
#include "app_error.h" #include "app_error.h"
#include "ble.h"
uint8_t ble_srv_report_ref_encode(uint8_t * p_encoded_buffer, uint8_t ble_srv_report_ref_encode(uint8_t * p_encoded_buffer,
const ble_srv_report_ref_t * p_report_ref) const ble_srv_report_ref_t * p_report_ref)
@ -59,3 +39,99 @@ void ble_srv_ascii_to_utf8(ble_srv_utf8_str_t * p_utf8, char * p_ascii)
p_utf8->length = (uint16_t)strlen(p_ascii); p_utf8->length = (uint16_t)strlen(p_ascii);
p_utf8->p_str = (uint8_t *)p_ascii; p_utf8->p_str = (uint8_t *)p_ascii;
} }
/**@brief Function for setting security requirements of a characteristic.
*
* @param[in] level required security level.
*
* @return encoded security level and security mode.
*/
static inline ble_gap_conn_sec_mode_t set_security_req(security_req_t level)
{
ble_gap_conn_sec_mode_t perm;
BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(&perm);
switch (level)
{
case SEC_NO_ACCESS:
BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(&perm);
break;
case SEC_OPEN:
BLE_GAP_CONN_SEC_MODE_SET_OPEN(&perm);
break;
case SEC_JUST_WORKS:
BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&perm);
break;
case SEC_MITM:
BLE_GAP_CONN_SEC_MODE_SET_ENC_WITH_MITM(&perm);
break;
case SEC_SIGNED:
BLE_GAP_CONN_SEC_MODE_SET_SIGNED_NO_MITM(&perm);
break;
case SEC_SIGNED_MITM:
BLE_GAP_CONN_SEC_MODE_SET_SIGNED_WITH_MITM(&perm);
break;
}
return(perm);
}
uint32_t characteristic_add(uint16_t service_handle,
ble_add_char_params_t * p_char_props,
ble_gatts_char_handles_t * p_char_handle)
{
ble_gatts_char_md_t char_md;
ble_gatts_attr_t attr_char_value;
ble_uuid_t char_uuid;
ble_gatts_attr_md_t attr_md;
if (p_char_props->uuid_type == 0)
{
char_uuid.type = BLE_UUID_TYPE_BLE;
}
else
{
char_uuid.type = p_char_props->uuid_type;
}
char_uuid.uuid = p_char_props->uuid;
memset(&attr_md, 0, sizeof(attr_md));
attr_md.read_perm = set_security_req(p_char_props->read_access);
attr_md.write_perm = set_security_req(p_char_props->write_access);
attr_md.rd_auth = (p_char_props->is_defered_read ? 1 : 0);
attr_md.wr_auth = (p_char_props->is_defered_write ? 1 : 0);
attr_md.vlen = (p_char_props->is_var_len ? 1 : 0);
attr_md.vloc = (p_char_props->is_value_local ? BLE_GATTS_VLOC_USER : BLE_GATTS_VLOC_STACK);
memset(&char_md, 0, sizeof(char_md));
if ((p_char_props->char_props.notify == 1)||(p_char_props->char_props.indicate == 1))
{
ble_gatts_attr_md_t cccd_md;
memset(&cccd_md, 0, sizeof(cccd_md));
cccd_md.write_perm = set_security_req(p_char_props->cccd_write_access);
BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cccd_md.read_perm);
cccd_md.vloc = BLE_GATTS_VLOC_STACK;
char_md.p_cccd_md = &cccd_md;
}
char_md.char_props = p_char_props->char_props;
memset(&attr_char_value, 0, sizeof(attr_char_value));
attr_char_value.p_uuid = &char_uuid;
attr_char_value.p_attr_md = &attr_md;
attr_char_value.max_len = p_char_props->max_len;
if (p_char_props->p_init_value != NULL)
{
attr_char_value.init_len = p_char_props->init_len;
attr_char_value.p_value = p_char_props->p_init_value;
}
return sd_ble_gatts_characteristic_add(service_handle,
&char_md,
&attr_char_value,
p_char_handle);
}

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/** @file /** @file
@ -35,7 +15,7 @@
* @defgroup ble_sdk_srv_common Common service definitions * @defgroup ble_sdk_srv_common Common service definitions
* @{ * @{
* @ingroup ble_sdk_srv * @ingroup ble_sdk_srv
* @brief Constants, type definitions and functions that are common to all services. * @brief Constants, type definitions, and functions that are common to all services.
*/ */
#ifndef BLE_SRV_COMMON_H__ #ifndef BLE_SRV_COMMON_H__
@ -45,6 +25,7 @@
#include <stdbool.h> #include <stdbool.h>
#include "ble_types.h" #include "ble_types.h"
#include "app_util.h" #include "app_util.h"
#include "ble.h"
#include "ble_gap.h" #include "ble_gap.h"
#include "ble_gatt.h" #include "ble_gatt.h"
@ -68,8 +49,6 @@
#define BLE_UUID_RUNNING_SPEED_AND_CADENCE 0x1814 /**< Running Speed and Cadence service UUID. */ #define BLE_UUID_RUNNING_SPEED_AND_CADENCE 0x1814 /**< Running Speed and Cadence service UUID. */
#define BLE_UUID_SCAN_PARAMETERS_SERVICE 0x1813 /**< Scan Parameters service UUID. */ #define BLE_UUID_SCAN_PARAMETERS_SERVICE 0x1813 /**< Scan Parameters service UUID. */
#define BLE_UUID_TX_POWER_SERVICE 0x1804 /**< TX Power service UUID. */ #define BLE_UUID_TX_POWER_SERVICE 0x1804 /**< TX Power service UUID. */
#define BLE_UUID_IPSP_SERVICE 0x1820 /**< Internet Protocol Support service UUID. */
/** @} */ /** @} */
/** @defgroup UUID_CHARACTERISTICS Characteristic UUID definitions /** @defgroup UUID_CHARACTERISTICS Characteristic UUID definitions
@ -158,19 +137,20 @@
#define BLE_SRV_ENCODED_REPORT_REF_LEN 2 /**< The length of an encoded Report Reference Descriptor. */ #define BLE_SRV_ENCODED_REPORT_REF_LEN 2 /**< The length of an encoded Report Reference Descriptor. */
#define BLE_CCCD_VALUE_LEN 2 /**< The length of a CCCD value. */ #define BLE_CCCD_VALUE_LEN 2 /**< The length of a CCCD value. */
/**@brief Type definition for error handler function which will be called in case of an error in /**@brief Type definition for error handler function that will be called in case of an error in
* a service or a service library module. */ * a service or a service library module. */
typedef void (*ble_srv_error_handler_t) (uint32_t nrf_error); typedef void (*ble_srv_error_handler_t) (uint32_t nrf_error);
/**@brief Value of a Report Reference descriptor. /**@brief Value of a Report Reference descriptor.
* *
* @details This is mapping information which maps the parent characteristic to the Report ID(s) and * @details This is mapping information that maps the parent characteristic to the Report ID(s) and
* Report Type(s) defined within a Report Map characteristic. * Report Type(s) defined within a Report Map characteristic.
*/ */
typedef struct typedef struct
{ {
uint8_t report_id; /**< Non-zero value if these is more than one instance of the same Report Type */ uint8_t report_id; /**< Non-zero value if there is more than one instance of the same Report Type */
uint8_t report_type; /**< Type of Report characteristic @if (SD_S110) (see @ref BLE_HIDS_REPORT_TYPE) @endif */ uint8_t report_type; /**< Type of Report characteristic (see @ref BLE_HIDS_REPORT_TYPE) */
} ble_srv_report_ref_t; } ble_srv_report_ref_t;
/**@brief UTF-8 string data type. /**@brief UTF-8 string data type.
@ -183,6 +163,7 @@ typedef struct
uint8_t * p_str; /**< String data. */ uint8_t * p_str; /**< String data. */
} ble_srv_utf8_str_t; } ble_srv_utf8_str_t;
/**@brief Security settings structure. /**@brief Security settings structure.
* @details This structure contains the security options needed during initialization of the * @details This structure contains the security options needed during initialization of the
* service. * service.
@ -195,11 +176,11 @@ typedef struct
/**@brief Security settings structure. /**@brief Security settings structure.
* @details This structure contains the security options needed during initialization of the * @details This structure contains the security options needed during initialization of the
* service. It can be used when the charecteristics contains cccd. * service. It can be used when the characteristics contains cccd.
*/ */
typedef struct typedef struct
{ {
ble_gap_conn_sec_mode_t cccd_write_perm; ble_gap_conn_sec_mode_t cccd_write_perm; /**< Write permissions for Client Characteristic Configuration Descriptor. */
ble_gap_conn_sec_mode_t read_perm; /**< Read permissions. */ ble_gap_conn_sec_mode_t read_perm; /**< Read permissions. */
ble_gap_conn_sec_mode_t write_perm; /**< Write permissions. */ ble_gap_conn_sec_mode_t write_perm; /**< Write permissions. */
} ble_srv_cccd_security_mode_t; } ble_srv_cccd_security_mode_t;
@ -209,7 +190,8 @@ typedef struct
* *
* @param[in] p_encoded_data Buffer where the encoded CCCD is stored. * @param[in] p_encoded_data Buffer where the encoded CCCD is stored.
* *
* @return TRUE if notification is enabled, FALSE otherwise. * @retval TRUE If notification is enabled.
* @retval FALSE Otherwise.
*/ */
static __INLINE bool ble_srv_is_notification_enabled(uint8_t * p_encoded_data) static __INLINE bool ble_srv_is_notification_enabled(uint8_t * p_encoded_data)
{ {
@ -222,7 +204,8 @@ static __INLINE bool ble_srv_is_notification_enabled(uint8_t * p_encoded_data)
* *
* @param[in] p_encoded_data Buffer where the encoded CCCD is stored. * @param[in] p_encoded_data Buffer where the encoded CCCD is stored.
* *
* @return TRUE if indication is enabled, FALSE otherwise. * @retval TRUE If indication is enabled.
* @retval FALSE Otherwise.
*/ */
static __INLINE bool ble_srv_is_indication_enabled(uint8_t * p_encoded_data) static __INLINE bool ble_srv_is_indication_enabled(uint8_t * p_encoded_data)
{ {
@ -240,13 +223,65 @@ static __INLINE bool ble_srv_is_indication_enabled(uint8_t * p_encoded_data)
uint8_t ble_srv_report_ref_encode(uint8_t * p_encoded_buffer, uint8_t ble_srv_report_ref_encode(uint8_t * p_encoded_buffer,
const ble_srv_report_ref_t * p_report_ref); const ble_srv_report_ref_t * p_report_ref);
/**@brief Function for making UTF-8 structure refer to an ASCII string. /**@brief Function for making a UTF-8 structure refer to an ASCII string.
* *
* @param[out] p_utf8 UTF-8 structure to be set. * @param[out] p_utf8 UTF-8 structure to be set.
* @param[in] p_ascii ASCII string to be referred to. * @param[in] p_ascii ASCII string to be referred to.
*/ */
void ble_srv_ascii_to_utf8(ble_srv_utf8_str_t * p_utf8, char * p_ascii); void ble_srv_ascii_to_utf8(ble_srv_utf8_str_t * p_utf8, char * p_ascii);
/**@brief Security Access enumeration.
* @details This enumeration gives the possible requirements for accessing a characteristic value.
*/
typedef enum
{
SEC_NO_ACCESS = 0, /**< Not possible to access. */
SEC_OPEN = 1, /**< Access open. */
SEC_JUST_WORKS = 2, /**< Access possible with 'Just Works' security at least. */
SEC_MITM = 3, /**< Access possible with 'MITM' security at least. */
SEC_SIGNED = 4, /**< Access possible with 'signed' security at least. */
SEC_SIGNED_MITM = 5 /**< Access possible with 'signed and MITM' security at least. */
}security_req_t;
/**@brief Add characteristic parameters structure.
* @details This structure contains the parameters needed to use the @ref characteristic_add function.
*/
typedef struct
{
uint16_t uuid; /**< Characteristic UUID (16 bits UUIDs).*/
uint8_t uuid_type; /**< Base UUID. If 0, the Bluetooth SIG UUID will be used. Otherwise, this should be a value returned by @ref sd_ble_uuid_vs_add when adding the base UUID.*/
uint16_t max_len; /**< Maximum length of the characteristic value.*/
uint16_t init_len; /**< Initial length of the characteristic value.*/
uint8_t * p_init_value; /**< Initial encoded value of the characteristic.*/
bool is_var_len; /**< Indicates if the characteristic value has variable length.*/
ble_gatt_char_props_t char_props; /**< Characteristic properties.*/
bool is_defered_read; /**< Indicate if deferred read operations are supported.*/
bool is_defered_write; /**< Indicate if deferred write operations are supported.*/
security_req_t read_access; /**< Security requirement for reading the characteristic value.*/
security_req_t write_access; /**< Security requirement for writing the characteristic value.*/
security_req_t cccd_write_access; /**< Security requirement for writing the characteristic's CCCD.*/
bool is_value_local; /**< Indicate if the content of the characteristic is to be stored locally or in the stack.*/
} ble_add_char_params_t;
/**@brief Function for adding a characteristic to a given service.
*
* If no pointer is given for the initial value,
* the initial length parameter will be ignored and the initial length will be 0.
*
* @param[in] service_handle Handle of the service to which the characteristic is to be added.
* @param[in] p_char_props Information needed to add the characteristic.
* @param[out] p_char_handle Handle of the added characteristic.
*
* @retval NRF_SUCCESS If the characteristic was added successfully. Otherwise, an error code is returned.
*/
uint32_t characteristic_add(uint16_t service_handle,
ble_add_char_params_t * p_char_props,
ble_gatts_char_handles_t * p_char_handle);
#endif // BLE_SRV_COMMON_H__ #endif // BLE_SRV_COMMON_H__
/** @} */ /** @} */

View File

@ -1,33 +1,12 @@
/* /* Copyright (C) 2013 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* Redistribution and use in source and binary forms, with or without modification, *
* are permitted provided that the following conditions are met: * Licensees are granted free, non-transferable use of the information. NO
* * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* 1. Redistributions of source code must retain the above copyright notice, this * the file.
* list of conditions and the following disclaimer. *
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/** /**
@ -85,7 +64,7 @@
* be stored. In such cases, application will be notified with DM_DEVICE_CONTEXT_FULL * be stored. In such cases, application will be notified with DM_DEVICE_CONTEXT_FULL
* as event result at the completion of the security procedure. * as event result at the completion of the security procedure.
*/ */
#define DEVICE_MANAGER_MAX_BONDS 2 #define DEVICE_MANAGER_MAX_BONDS 7
/** /**

View File

@ -1,33 +1,12 @@
/* /* Copyright (C) 2013 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* Redistribution and use in source and binary forms, with or without modification, *
* are permitted provided that the following conditions are met: * Licensees are granted free, non-transferable use of the information. NO
* * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* 1. Redistributions of source code must retain the above copyright notice, this * the file.
* list of conditions and the following disclaimer. *
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/** /**

View File

@ -1,36 +1,16 @@
/* /* Copyright (C) 2013 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* Redistribution and use in source and binary forms, with or without modification, *
* are permitted provided that the following conditions are met: * Licensees are granted free, non-transferable use of the information. NO
* * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* 1. Redistributions of source code must retain the above copyright notice, this * the file.
* list of conditions and the following disclaimer. *
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
#include "device_manager.h" #include "device_manager.h"
#include "app_trace.h"
#include "pstorage.h" #include "pstorage.h"
#include "ble_hci.h" #include "ble_hci.h"
#include "app_error.h" #include "app_error.h"
@ -161,7 +141,7 @@ typedef enum
* @note That if ENABLE_DEBUG_LOG_SUPPORT is disabled, having DM_DISABLE_LOGS has no effect. * @note That if ENABLE_DEBUG_LOG_SUPPORT is disabled, having DM_DISABLE_LOGS has no effect.
* @{ * @{
*/ */
#define DM_DISABLE_LOGS /**< Enable this macro to disable any logs from this module. */ #define nDM_DISABLE_LOGS /**< Enable this macro to disable any logs from this module. */
#ifndef DM_DISABLE_LOGS #ifndef DM_DISABLE_LOGS
#define DM_LOG app_trace_log /**< Used for logging details. */ #define DM_LOG app_trace_log /**< Used for logging details. */

View File

@ -1,33 +1,31 @@
/* /* Copyright (c) 2015, Nordic Semiconductor ASA
* Copyright (c) Nordic Semiconductor ASA * All rights reserved.
* All rights reserved. *
* * Redistribution and use in source and binary forms, with or without
* Redistribution and use in source and binary forms, with or without modification, * modification, are permitted provided that the following conditions are met:
* are permitted provided that the following conditions are met: *
* * * Redistributions of source code must retain the above copyright notice, this
* 1. Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer.
* list of conditions and the following disclaimer. *
* * * Redistributions in binary form must reproduce the above copyright notice,
* 2. Redistributions in binary form must reproduce the above copyright notice, this * this list of conditions and the following disclaimer in the documentation
* list of conditions and the following disclaimer in the documentation and/or * and/or other materials provided with the distribution.
* other materials provided with the distribution. *
* * * Neither the name of Nordic Semiconductor ASA nor the names of its
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other * contributors may be used to endorse or promote products derived from
* contributors to this software may be used to endorse or promote products * this software without specific prior written permission.
* derived from this software without specific prior written permission. *
* * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS *
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
#ifndef _COMPILER_ABSTRACTION_H #ifndef _COMPILER_ABSTRACTION_H
#define _COMPILER_ABSTRACTION_H #define _COMPILER_ABSTRACTION_H

View File

@ -1,33 +1,31 @@
/* /* Copyright (c) 2015, Nordic Semiconductor ASA
* Copyright (c) Nordic Semiconductor ASA * All rights reserved.
* All rights reserved. *
* * Redistribution and use in source and binary forms, with or without
* Redistribution and use in source and binary forms, with or without modification, * modification, are permitted provided that the following conditions are met:
* are permitted provided that the following conditions are met: *
* * * Redistributions of source code must retain the above copyright notice, this
* 1. Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer.
* list of conditions and the following disclaimer. *
* * * Redistributions in binary form must reproduce the above copyright notice,
* 2. Redistributions in binary form must reproduce the above copyright notice, this * this list of conditions and the following disclaimer in the documentation
* list of conditions and the following disclaimer in the documentation and/or * and/or other materials provided with the distribution.
* other materials provided with the distribution. *
* * * Neither the name of Nordic Semiconductor ASA nor the names of its
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other * contributors may be used to endorse or promote products derived from
* contributors to this software may be used to endorse or promote products * this software without specific prior written permission.
* derived from this software without specific prior written permission. *
* * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS *
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
#ifndef NRF_H #ifndef NRF_H
@ -46,9 +44,13 @@
#include "nrf51.h" #include "nrf51.h"
#include "nrf51_bitfields.h" #include "nrf51_bitfields.h"
#include "nrf51_deprecated.h" #include "nrf51_deprecated.h"
#elif defined (NRF52)
#include "nrf52.h"
#include "nrf52_bitfields.h"
#include "nrf51_to_nrf52.h"
#else #else
#error "Device family must be defined. See nrf.h." #error "Device family must be defined. See nrf.h."
#endif /* NRF51 */ #endif /* NRF51, NRF52 */
#include "compiler_abstraction.h" #include "compiler_abstraction.h"

View File

@ -1,34 +1,56 @@
/*
* Copyright (c) Nordic Semiconductor ASA /****************************************************************************************************//**
* All rights reserved. * @file nrf51.h
* *
* Redistribution and use in source and binary forms, with or without modification, * @brief CMSIS Cortex-M0 Peripheral Access Layer Header File for
* are permitted provided that the following conditions are met: * nrf51 from Nordic Semiconductor.
* *
* 1. Redistributions of source code must retain the above copyright notice, this * @version V522
* list of conditions and the following disclaimer. * @date 15. June 2015
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this * @note Generated with SVDConv V2.81d
* list of conditions and the following disclaimer in the documentation and/or * from CMSIS SVD File 'nrf51.xml' Version 522,
* other materials provided with the distribution. *
* * @par Copyright (c) 2013, Nordic Semiconductor ASA
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other * All rights reserved.
* contributors to this software may be used to endorse or promote products *
* derived from this software without specific prior written permission. * Redistribution and use in source and binary forms, with or without
* * modification, are permitted provided that the following conditions are met:
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * * Redistributions of source code must retain the above copyright notice, this
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * list of conditions and the following disclaimer.
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR * * Redistributions in binary form must reproduce the above copyright notice,
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * this list of conditions and the following disclaimer in the documentation
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * and/or other materials provided with the distribution.
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON *
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * * Neither the name of Nordic Semiconductor ASA nor the names of its
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * contributors may be used to endorse or promote products derived from
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * this software without specific prior written permission.
* *
*/ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*
*******************************************************************************************************/
/** @addtogroup Nordic Semiconductor
* @{
*/
/** @addtogroup nrf51
* @{
*/
#ifndef NRF51_H #ifndef NRF51_H
#define NRF51_H #define NRF51_H
@ -270,27 +292,6 @@ typedef struct { /*!< MPU Structure
} NRF_MPU_Type; } NRF_MPU_Type;
/* ================================================================================ */
/* ================ PU ================ */
/* ================================================================================ */
/**
* @brief Patch unit. (PU)
*/
typedef struct { /*!< PU Structure */
__I uint32_t RESERVED0[448];
__IO uint32_t REPLACEADDR[8]; /*!< Address of first instruction to replace. */
__I uint32_t RESERVED1[24];
__IO uint32_t PATCHADDR[8]; /*!< Relative address of patch instructions. */
__I uint32_t RESERVED2[24];
__IO uint32_t PATCHEN; /*!< Patch enable register. */
__IO uint32_t PATCHENSET; /*!< Patch enable register. */
__IO uint32_t PATCHENCLR; /*!< Patch disable register. */
} NRF_PU_Type;
/* ================================================================================ */ /* ================================================================================ */
/* ================ AMLI ================ */ /* ================ AMLI ================ */
/* ================================================================================ */ /* ================================================================================ */
@ -344,11 +345,11 @@ typedef struct { /*!< RADIO Structure
__IO uint32_t INTENCLR; /*!< Interrupt enable clear register. */ __IO uint32_t INTENCLR; /*!< Interrupt enable clear register. */
__I uint32_t RESERVED4[61]; __I uint32_t RESERVED4[61];
__I uint32_t CRCSTATUS; /*!< CRC status of received packet. */ __I uint32_t CRCSTATUS; /*!< CRC status of received packet. */
__I uint32_t CD; /*!< Carrier detect. */ __I uint32_t RESERVED5;
__I uint32_t RXMATCH; /*!< Received address. */ __I uint32_t RXMATCH; /*!< Received address. */
__I uint32_t RXCRC; /*!< Received CRC. */ __I uint32_t RXCRC; /*!< Received CRC. */
__I uint32_t DAI; /*!< Device address match index. */ __I uint32_t DAI; /*!< Device address match index. */
__I uint32_t RESERVED5[60]; __I uint32_t RESERVED6[60];
__IO uint32_t PACKETPTR; /*!< Packet pointer. Decision point: START task. */ __IO uint32_t PACKETPTR; /*!< Packet pointer. Decision point: START task. */
__IO uint32_t FREQUENCY; /*!< Frequency. */ __IO uint32_t FREQUENCY; /*!< Frequency. */
__IO uint32_t TXPOWER; /*!< Output power. */ __IO uint32_t TXPOWER; /*!< Output power. */
@ -367,22 +368,22 @@ typedef struct { /*!< RADIO Structure
__IO uint32_t TEST; /*!< Test features enable register. */ __IO uint32_t TEST; /*!< Test features enable register. */
__IO uint32_t TIFS; /*!< Inter Frame Spacing in microseconds. */ __IO uint32_t TIFS; /*!< Inter Frame Spacing in microseconds. */
__I uint32_t RSSISAMPLE; /*!< RSSI sample. */ __I uint32_t RSSISAMPLE; /*!< RSSI sample. */
__I uint32_t RESERVED6; __I uint32_t RESERVED7;
__I uint32_t STATE; /*!< Current radio state. */ __I uint32_t STATE; /*!< Current radio state. */
__IO uint32_t DATAWHITEIV; /*!< Data whitening initial value. */ __IO uint32_t DATAWHITEIV; /*!< Data whitening initial value. */
__I uint32_t RESERVED7[2]; __I uint32_t RESERVED8[2];
__IO uint32_t BCC; /*!< Bit counter compare. */ __IO uint32_t BCC; /*!< Bit counter compare. */
__I uint32_t RESERVED8[39]; __I uint32_t RESERVED9[39];
__IO uint32_t DAB[8]; /*!< Device address base segment. */ __IO uint32_t DAB[8]; /*!< Device address base segment. */
__IO uint32_t DAP[8]; /*!< Device address prefix. */ __IO uint32_t DAP[8]; /*!< Device address prefix. */
__IO uint32_t DACNF; /*!< Device address match configuration. */ __IO uint32_t DACNF; /*!< Device address match configuration. */
__I uint32_t RESERVED9[56]; __I uint32_t RESERVED10[56];
__IO uint32_t OVERRIDE0; /*!< Trim value override register 0. */ __IO uint32_t OVERRIDE0; /*!< Trim value override register 0. */
__IO uint32_t OVERRIDE1; /*!< Trim value override register 1. */ __IO uint32_t OVERRIDE1; /*!< Trim value override register 1. */
__IO uint32_t OVERRIDE2; /*!< Trim value override register 2. */ __IO uint32_t OVERRIDE2; /*!< Trim value override register 2. */
__IO uint32_t OVERRIDE3; /*!< Trim value override register 3. */ __IO uint32_t OVERRIDE3; /*!< Trim value override register 3. */
__IO uint32_t OVERRIDE4; /*!< Trim value override register 4. */ __IO uint32_t OVERRIDE4; /*!< Trim value override register 4. */
__I uint32_t RESERVED10[561]; __I uint32_t RESERVED11[561];
__IO uint32_t POWER; /*!< Peripheral power control. */ __IO uint32_t POWER; /*!< Peripheral power control. */
} NRF_RADIO_Type; } NRF_RADIO_Type;
@ -413,14 +414,16 @@ typedef struct { /*!< UART Structure
__IO uint32_t EVENTS_ERROR; /*!< Error detected. */ __IO uint32_t EVENTS_ERROR; /*!< Error detected. */
__I uint32_t RESERVED4[7]; __I uint32_t RESERVED4[7];
__IO uint32_t EVENTS_RXTO; /*!< Receiver timeout. */ __IO uint32_t EVENTS_RXTO; /*!< Receiver timeout. */
__I uint32_t RESERVED5[111]; __I uint32_t RESERVED5[46];
__IO uint32_t SHORTS; /*!< Shortcuts for UART. */
__I uint32_t RESERVED6[64];
__IO uint32_t INTENSET; /*!< Interrupt enable set register. */ __IO uint32_t INTENSET; /*!< Interrupt enable set register. */
__IO uint32_t INTENCLR; /*!< Interrupt enable clear register. */ __IO uint32_t INTENCLR; /*!< Interrupt enable clear register. */
__I uint32_t RESERVED6[93]; __I uint32_t RESERVED7[93];
__IO uint32_t ERRORSRC; /*!< Error source. Write error field to 1 to clear error. */ __IO uint32_t ERRORSRC; /*!< Error source. Write error field to 1 to clear error. */
__I uint32_t RESERVED7[31]; __I uint32_t RESERVED8[31];
__IO uint32_t ENABLE; /*!< Enable UART and acquire IOs. */ __IO uint32_t ENABLE; /*!< Enable UART and acquire IOs. */
__I uint32_t RESERVED8; __I uint32_t RESERVED9;
__IO uint32_t PSELRTS; /*!< Pin select for RTS. */ __IO uint32_t PSELRTS; /*!< Pin select for RTS. */
__IO uint32_t PSELTXD; /*!< Pin select for TXD. */ __IO uint32_t PSELTXD; /*!< Pin select for TXD. */
__IO uint32_t PSELCTS; /*!< Pin select for CTS. */ __IO uint32_t PSELCTS; /*!< Pin select for CTS. */
@ -429,11 +432,11 @@ typedef struct { /*!< UART Structure
Once read the character is consumed. If read when no character Once read the character is consumed. If read when no character
available, the UART will stop working. */ available, the UART will stop working. */
__O uint32_t TXD; /*!< TXD register. */ __O uint32_t TXD; /*!< TXD register. */
__I uint32_t RESERVED9; __I uint32_t RESERVED10;
__IO uint32_t BAUDRATE; /*!< UART Baudrate. */ __IO uint32_t BAUDRATE; /*!< UART Baudrate. */
__I uint32_t RESERVED10[17]; __I uint32_t RESERVED11[17];
__IO uint32_t CONFIG; /*!< Configuration of parity and hardware flow control register. */ __IO uint32_t CONFIG; /*!< Configuration of parity and hardware flow control register. */
__I uint32_t RESERVED11[675]; __I uint32_t RESERVED12[675];
__IO uint32_t POWER; /*!< Peripheral power control. */ __IO uint32_t POWER; /*!< Peripheral power control. */
} NRF_UART_Type; } NRF_UART_Type;
@ -596,32 +599,28 @@ typedef struct { /*!< SPIM Structure
__IO uint32_t EVENTS_STOPPED; /*!< SPI transaction has stopped. */ __IO uint32_t EVENTS_STOPPED; /*!< SPI transaction has stopped. */
__I uint32_t RESERVED3[2]; __I uint32_t RESERVED3[2];
__IO uint32_t EVENTS_ENDRX; /*!< End of RXD buffer reached. */ __IO uint32_t EVENTS_ENDRX; /*!< End of RXD buffer reached. */
__I uint32_t RESERVED4; __I uint32_t RESERVED4[3];
__IO uint32_t EVENTS_END; /*!< End of RXD buffer and TXD buffer reached. */
__I uint32_t RESERVED5;
__IO uint32_t EVENTS_ENDTX; /*!< End of TXD buffer reached. */ __IO uint32_t EVENTS_ENDTX; /*!< End of TXD buffer reached. */
__I uint32_t RESERVED6[10]; __I uint32_t RESERVED5[10];
__IO uint32_t EVENTS_STARTED; /*!< Transaction started. */ __IO uint32_t EVENTS_STARTED; /*!< Transaction started. */
__I uint32_t RESERVED7[44]; __I uint32_t RESERVED6[109];
__IO uint32_t SHORTS; /*!< Shortcuts for SPIM. */
__I uint32_t RESERVED8[64];
__IO uint32_t INTENSET; /*!< Interrupt enable set register. */ __IO uint32_t INTENSET; /*!< Interrupt enable set register. */
__IO uint32_t INTENCLR; /*!< Interrupt enable clear register. */ __IO uint32_t INTENCLR; /*!< Interrupt enable clear register. */
__I uint32_t RESERVED9[125]; __I uint32_t RESERVED7[125];
__IO uint32_t ENABLE; /*!< Enable SPIM. */ __IO uint32_t ENABLE; /*!< Enable SPIM. */
__I uint32_t RESERVED10; __I uint32_t RESERVED8;
SPIM_PSEL_Type PSEL; /*!< Pin select configuration. */ SPIM_PSEL_Type PSEL; /*!< Pin select configuration. */
__I uint32_t RESERVED11[4]; __I uint32_t RESERVED9[4];
__IO uint32_t FREQUENCY; /*!< SPI frequency. */ __IO uint32_t FREQUENCY; /*!< SPI frequency. */
__I uint32_t RESERVED12[3]; __I uint32_t RESERVED10[3];
SPIM_RXD_Type RXD; /*!< RXD EasyDMA configuration and status. */ SPIM_RXD_Type RXD; /*!< RXD EasyDMA configuration and status. */
__I uint32_t RESERVED13; __I uint32_t RESERVED11;
SPIM_TXD_Type TXD; /*!< TXD EasyDMA configuration and status. */ SPIM_TXD_Type TXD; /*!< TXD EasyDMA configuration and status. */
__I uint32_t RESERVED14; __I uint32_t RESERVED12;
__IO uint32_t CONFIG; /*!< Configuration register. */ __IO uint32_t CONFIG; /*!< Configuration register. */
__I uint32_t RESERVED15[26]; __I uint32_t RESERVED13[26];
__IO uint32_t ORC; /*!< Over-read character. */ __IO uint32_t ORC; /*!< Over-read character. */
__I uint32_t RESERVED16[654]; __I uint32_t RESERVED14[654];
__IO uint32_t POWER; /*!< Peripheral power control. */ __IO uint32_t POWER; /*!< Peripheral power control. */
} NRF_SPIM_Type; } NRF_SPIM_Type;
@ -1200,7 +1199,6 @@ typedef struct { /*!< GPIO Structure
#define NRF_POWER_BASE 0x40000000UL #define NRF_POWER_BASE 0x40000000UL
#define NRF_CLOCK_BASE 0x40000000UL #define NRF_CLOCK_BASE 0x40000000UL
#define NRF_MPU_BASE 0x40000000UL #define NRF_MPU_BASE 0x40000000UL
#define NRF_PU_BASE 0x40000000UL
#define NRF_AMLI_BASE 0x40000000UL #define NRF_AMLI_BASE 0x40000000UL
#define NRF_RADIO_BASE 0x40001000UL #define NRF_RADIO_BASE 0x40001000UL
#define NRF_UART0_BASE 0x40002000UL #define NRF_UART0_BASE 0x40002000UL
@ -1240,7 +1238,6 @@ typedef struct { /*!< GPIO Structure
#define NRF_POWER ((NRF_POWER_Type *) NRF_POWER_BASE) #define NRF_POWER ((NRF_POWER_Type *) NRF_POWER_BASE)
#define NRF_CLOCK ((NRF_CLOCK_Type *) NRF_CLOCK_BASE) #define NRF_CLOCK ((NRF_CLOCK_Type *) NRF_CLOCK_BASE)
#define NRF_MPU ((NRF_MPU_Type *) NRF_MPU_BASE) #define NRF_MPU ((NRF_MPU_Type *) NRF_MPU_BASE)
#define NRF_PU ((NRF_PU_Type *) NRF_PU_BASE)
#define NRF_AMLI ((NRF_AMLI_Type *) NRF_AMLI_BASE) #define NRF_AMLI ((NRF_AMLI_Type *) NRF_AMLI_BASE)
#define NRF_RADIO ((NRF_RADIO_Type *) NRF_RADIO_BASE) #define NRF_RADIO ((NRF_RADIO_Type *) NRF_RADIO_BASE)
#define NRF_UART0 ((NRF_UART_Type *) NRF_UART0_BASE) #define NRF_UART0 ((NRF_UART_Type *) NRF_UART0_BASE)

View File

@ -1,33 +1,31 @@
/* /* Copyright (c) 2015, Nordic Semiconductor ASA
* Copyright (c) Nordic Semiconductor ASA * All rights reserved.
* All rights reserved. *
* * Redistribution and use in source and binary forms, with or without
* Redistribution and use in source and binary forms, with or without modification, * modification, are permitted provided that the following conditions are met:
* are permitted provided that the following conditions are met: *
* * * Redistributions of source code must retain the above copyright notice, this
* 1. Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer.
* list of conditions and the following disclaimer. *
* * * Redistributions in binary form must reproduce the above copyright notice,
* 2. Redistributions in binary form must reproduce the above copyright notice, this * this list of conditions and the following disclaimer in the documentation
* list of conditions and the following disclaimer in the documentation and/or * and/or other materials provided with the distribution.
* other materials provided with the distribution. *
* * * Neither the name of Nordic Semiconductor ASA nor the names of its
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other * contributors may be used to endorse or promote products derived from
* contributors to this software may be used to endorse or promote products * this software without specific prior written permission.
* derived from this software without specific prior written permission. *
* * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS *
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
#ifndef __NRF51_BITS_H #ifndef __NRF51_BITS_H
#define __NRF51_BITS_H #define __NRF51_BITS_H
@ -4598,186 +4596,6 @@
#define PPI_CHG_CH0_Included (1UL) /*!< Channel included. */ #define PPI_CHG_CH0_Included (1UL) /*!< Channel included. */
/* Peripheral: PU */
/* Description: Patch unit. */
/* Register: PU_PATCHADDR */
/* Description: Relative address of patch instructions. */
/* Bits 24..0 : Relative address of patch instructions. */
#define PU_PATCHADDR_PATCHADDR_Pos (0UL) /*!< Position of PATCHADDR field. */
#define PU_PATCHADDR_PATCHADDR_Msk (0x1FFFFFFUL << PU_PATCHADDR_PATCHADDR_Pos) /*!< Bit mask of PATCHADDR field. */
/* Register: PU_PATCHEN */
/* Description: Patch enable register. */
/* Bit 7 : Patch 7 enabled. */
#define PU_PATCHEN_PATCH7_Pos (7UL) /*!< Position of PATCH7 field. */
#define PU_PATCHEN_PATCH7_Msk (0x1UL << PU_PATCHEN_PATCH7_Pos) /*!< Bit mask of PATCH7 field. */
#define PU_PATCHEN_PATCH7_Disabled (0UL) /*!< Patch disabled. */
#define PU_PATCHEN_PATCH7_Enabled (1UL) /*!< Patch enabled. */
/* Bit 6 : Patch 6 enabled. */
#define PU_PATCHEN_PATCH6_Pos (6UL) /*!< Position of PATCH6 field. */
#define PU_PATCHEN_PATCH6_Msk (0x1UL << PU_PATCHEN_PATCH6_Pos) /*!< Bit mask of PATCH6 field. */
#define PU_PATCHEN_PATCH6_Disabled (0UL) /*!< Patch disabled. */
#define PU_PATCHEN_PATCH6_Enabled (1UL) /*!< Patch enabled. */
/* Bit 5 : Patch 5 enabled. */
#define PU_PATCHEN_PATCH5_Pos (5UL) /*!< Position of PATCH5 field. */
#define PU_PATCHEN_PATCH5_Msk (0x1UL << PU_PATCHEN_PATCH5_Pos) /*!< Bit mask of PATCH5 field. */
#define PU_PATCHEN_PATCH5_Disabled (0UL) /*!< Patch disabled. */
#define PU_PATCHEN_PATCH5_Enabled (1UL) /*!< Patch enabled. */
/* Bit 4 : Patch 4 enabled. */
#define PU_PATCHEN_PATCH4_Pos (4UL) /*!< Position of PATCH4 field. */
#define PU_PATCHEN_PATCH4_Msk (0x1UL << PU_PATCHEN_PATCH4_Pos) /*!< Bit mask of PATCH4 field. */
#define PU_PATCHEN_PATCH4_Disabled (0UL) /*!< Patch disabled. */
#define PU_PATCHEN_PATCH4_Enabled (1UL) /*!< Patch enabled. */
/* Bit 3 : Patch 3 enabled. */
#define PU_PATCHEN_PATCH3_Pos (3UL) /*!< Position of PATCH3 field. */
#define PU_PATCHEN_PATCH3_Msk (0x1UL << PU_PATCHEN_PATCH3_Pos) /*!< Bit mask of PATCH3 field. */
#define PU_PATCHEN_PATCH3_Disabled (0UL) /*!< Patch disabled. */
#define PU_PATCHEN_PATCH3_Enabled (1UL) /*!< Patch enabled. */
/* Bit 2 : Patch 2 enabled. */
#define PU_PATCHEN_PATCH2_Pos (2UL) /*!< Position of PATCH2 field. */
#define PU_PATCHEN_PATCH2_Msk (0x1UL << PU_PATCHEN_PATCH2_Pos) /*!< Bit mask of PATCH2 field. */
#define PU_PATCHEN_PATCH2_Disabled (0UL) /*!< Patch disabled. */
#define PU_PATCHEN_PATCH2_Enabled (1UL) /*!< Patch enabled. */
/* Bit 1 : Patch 1 enabled. */
#define PU_PATCHEN_PATCH1_Pos (1UL) /*!< Position of PATCH1 field. */
#define PU_PATCHEN_PATCH1_Msk (0x1UL << PU_PATCHEN_PATCH1_Pos) /*!< Bit mask of PATCH1 field. */
#define PU_PATCHEN_PATCH1_Disabled (0UL) /*!< Patch disabled. */
#define PU_PATCHEN_PATCH1_Enabled (1UL) /*!< Patch enabled. */
/* Bit 0 : Patch 0 enabled. */
#define PU_PATCHEN_PATCH0_Pos (0UL) /*!< Position of PATCH0 field. */
#define PU_PATCHEN_PATCH0_Msk (0x1UL << PU_PATCHEN_PATCH0_Pos) /*!< Bit mask of PATCH0 field. */
#define PU_PATCHEN_PATCH0_Disabled (0UL) /*!< Patch disabled. */
#define PU_PATCHEN_PATCH0_Enabled (1UL) /*!< Patch enabled. */
/* Register: PU_PATCHENSET */
/* Description: Patch enable register. */
/* Bit 7 : Patch 7 enabled. */
#define PU_PATCHENSET_PATCH7_Pos (7UL) /*!< Position of PATCH7 field. */
#define PU_PATCHENSET_PATCH7_Msk (0x1UL << PU_PATCHENSET_PATCH7_Pos) /*!< Bit mask of PATCH7 field. */
#define PU_PATCHENSET_PATCH7_Disabled (0UL) /*!< Patch disabled. */
#define PU_PATCHENSET_PATCH7_Enabled (1UL) /*!< Patch enabled. */
#define PU_PATCHENSET_PATCH7_Set (1UL) /*!< Enable patch on write. */
/* Bit 6 : Patch 6 enabled. */
#define PU_PATCHENSET_PATCH6_Pos (6UL) /*!< Position of PATCH6 field. */
#define PU_PATCHENSET_PATCH6_Msk (0x1UL << PU_PATCHENSET_PATCH6_Pos) /*!< Bit mask of PATCH6 field. */
#define PU_PATCHENSET_PATCH6_Disabled (0UL) /*!< Patch disabled. */
#define PU_PATCHENSET_PATCH6_Enabled (1UL) /*!< Patch enabled. */
#define PU_PATCHENSET_PATCH6_Set (1UL) /*!< Enable patch on write. */
/* Bit 5 : Patch 5 enabled. */
#define PU_PATCHENSET_PATCH5_Pos (5UL) /*!< Position of PATCH5 field. */
#define PU_PATCHENSET_PATCH5_Msk (0x1UL << PU_PATCHENSET_PATCH5_Pos) /*!< Bit mask of PATCH5 field. */
#define PU_PATCHENSET_PATCH5_Disabled (0UL) /*!< Patch disabled. */
#define PU_PATCHENSET_PATCH5_Enabled (1UL) /*!< Patch enabled. */
#define PU_PATCHENSET_PATCH5_Set (1UL) /*!< Enable patch on write. */
/* Bit 4 : Patch 4 enabled. */
#define PU_PATCHENSET_PATCH4_Pos (4UL) /*!< Position of PATCH4 field. */
#define PU_PATCHENSET_PATCH4_Msk (0x1UL << PU_PATCHENSET_PATCH4_Pos) /*!< Bit mask of PATCH4 field. */
#define PU_PATCHENSET_PATCH4_Disabled (0UL) /*!< Patch disabled. */
#define PU_PATCHENSET_PATCH4_Enabled (1UL) /*!< Patch enabled. */
#define PU_PATCHENSET_PATCH4_Set (1UL) /*!< Enable patch on write. */
/* Bit 3 : Patch 3 enabled. */
#define PU_PATCHENSET_PATCH3_Pos (3UL) /*!< Position of PATCH3 field. */
#define PU_PATCHENSET_PATCH3_Msk (0x1UL << PU_PATCHENSET_PATCH3_Pos) /*!< Bit mask of PATCH3 field. */
#define PU_PATCHENSET_PATCH3_Disabled (0UL) /*!< Patch disabled. */
#define PU_PATCHENSET_PATCH3_Enabled (1UL) /*!< Patch enabled. */
#define PU_PATCHENSET_PATCH3_Set (1UL) /*!< Enable patch on write. */
/* Bit 2 : Patch 2 enabled. */
#define PU_PATCHENSET_PATCH2_Pos (2UL) /*!< Position of PATCH2 field. */
#define PU_PATCHENSET_PATCH2_Msk (0x1UL << PU_PATCHENSET_PATCH2_Pos) /*!< Bit mask of PATCH2 field. */
#define PU_PATCHENSET_PATCH2_Disabled (0UL) /*!< Patch disabled. */
#define PU_PATCHENSET_PATCH2_Enabled (1UL) /*!< Patch enabled. */
#define PU_PATCHENSET_PATCH2_Set (1UL) /*!< Enable patch on write. */
/* Bit 1 : Patch 1 enabled. */
#define PU_PATCHENSET_PATCH1_Pos (1UL) /*!< Position of PATCH1 field. */
#define PU_PATCHENSET_PATCH1_Msk (0x1UL << PU_PATCHENSET_PATCH1_Pos) /*!< Bit mask of PATCH1 field. */
#define PU_PATCHENSET_PATCH1_Disabled (0UL) /*!< Patch disabled. */
#define PU_PATCHENSET_PATCH1_Enabled (1UL) /*!< Patch enabled. */
#define PU_PATCHENSET_PATCH1_Set (1UL) /*!< Enable patch on write. */
/* Bit 0 : Patch 0 enabled. */
#define PU_PATCHENSET_PATCH0_Pos (0UL) /*!< Position of PATCH0 field. */
#define PU_PATCHENSET_PATCH0_Msk (0x1UL << PU_PATCHENSET_PATCH0_Pos) /*!< Bit mask of PATCH0 field. */
#define PU_PATCHENSET_PATCH0_Disabled (0UL) /*!< Patch disabled. */
#define PU_PATCHENSET_PATCH0_Enabled (1UL) /*!< Patch enabled. */
#define PU_PATCHENSET_PATCH0_Set (1UL) /*!< Enable patch on write. */
/* Register: PU_PATCHENCLR */
/* Description: Patch disable register. */
/* Bit 7 : Patch 7 enabled. */
#define PU_PATCHENCLR_PATCH7_Pos (7UL) /*!< Position of PATCH7 field. */
#define PU_PATCHENCLR_PATCH7_Msk (0x1UL << PU_PATCHENCLR_PATCH7_Pos) /*!< Bit mask of PATCH7 field. */
#define PU_PATCHENCLR_PATCH7_Disabled (0UL) /*!< Patch disabled. */
#define PU_PATCHENCLR_PATCH7_Enabled (1UL) /*!< Patch enabled. */
#define PU_PATCHENCLR_PATCH7_Clear (1UL) /*!< Disable patch on write. */
/* Bit 6 : Patch 6 enabled. */
#define PU_PATCHENCLR_PATCH6_Pos (6UL) /*!< Position of PATCH6 field. */
#define PU_PATCHENCLR_PATCH6_Msk (0x1UL << PU_PATCHENCLR_PATCH6_Pos) /*!< Bit mask of PATCH6 field. */
#define PU_PATCHENCLR_PATCH6_Disabled (0UL) /*!< Patch disabled. */
#define PU_PATCHENCLR_PATCH6_Enabled (1UL) /*!< Patch enabled. */
#define PU_PATCHENCLR_PATCH6_Clear (1UL) /*!< Disable patch on write. */
/* Bit 5 : Patch 5 enabled. */
#define PU_PATCHENCLR_PATCH5_Pos (5UL) /*!< Position of PATCH5 field. */
#define PU_PATCHENCLR_PATCH5_Msk (0x1UL << PU_PATCHENCLR_PATCH5_Pos) /*!< Bit mask of PATCH5 field. */
#define PU_PATCHENCLR_PATCH5_Disabled (0UL) /*!< Patch disabled. */
#define PU_PATCHENCLR_PATCH5_Enabled (1UL) /*!< Patch enabled. */
#define PU_PATCHENCLR_PATCH5_Clear (1UL) /*!< Disable patch on write. */
/* Bit 4 : Patch 4 enabled. */
#define PU_PATCHENCLR_PATCH4_Pos (4UL) /*!< Position of PATCH4 field. */
#define PU_PATCHENCLR_PATCH4_Msk (0x1UL << PU_PATCHENCLR_PATCH4_Pos) /*!< Bit mask of PATCH4 field. */
#define PU_PATCHENCLR_PATCH4_Disabled (0UL) /*!< Patch disabled. */
#define PU_PATCHENCLR_PATCH4_Enabled (1UL) /*!< Patch enabled. */
#define PU_PATCHENCLR_PATCH4_Clear (1UL) /*!< Disable patch on write. */
/* Bit 3 : Patch 3 enabled. */
#define PU_PATCHENCLR_PATCH3_Pos (3UL) /*!< Position of PATCH3 field. */
#define PU_PATCHENCLR_PATCH3_Msk (0x1UL << PU_PATCHENCLR_PATCH3_Pos) /*!< Bit mask of PATCH3 field. */
#define PU_PATCHENCLR_PATCH3_Disabled (0UL) /*!< Patch disabled. */
#define PU_PATCHENCLR_PATCH3_Enabled (1UL) /*!< Patch enabled. */
#define PU_PATCHENCLR_PATCH3_Clear (1UL) /*!< Disable patch on write. */
/* Bit 2 : Patch 2 enabled. */
#define PU_PATCHENCLR_PATCH2_Pos (2UL) /*!< Position of PATCH2 field. */
#define PU_PATCHENCLR_PATCH2_Msk (0x1UL << PU_PATCHENCLR_PATCH2_Pos) /*!< Bit mask of PATCH2 field. */
#define PU_PATCHENCLR_PATCH2_Disabled (0UL) /*!< Patch disabled. */
#define PU_PATCHENCLR_PATCH2_Enabled (1UL) /*!< Patch enabled. */
#define PU_PATCHENCLR_PATCH2_Clear (1UL) /*!< Disable patch on write. */
/* Bit 1 : Patch 1 enabled. */
#define PU_PATCHENCLR_PATCH1_Pos (1UL) /*!< Position of PATCH1 field. */
#define PU_PATCHENCLR_PATCH1_Msk (0x1UL << PU_PATCHENCLR_PATCH1_Pos) /*!< Bit mask of PATCH1 field. */
#define PU_PATCHENCLR_PATCH1_Disabled (0UL) /*!< Patch disabled. */
#define PU_PATCHENCLR_PATCH1_Enabled (1UL) /*!< Patch enabled. */
#define PU_PATCHENCLR_PATCH1_Clear (1UL) /*!< Disable patch on write. */
/* Bit 0 : Patch 0 enabled. */
#define PU_PATCHENCLR_PATCH0_Pos (0UL) /*!< Position of PATCH0 field. */
#define PU_PATCHENCLR_PATCH0_Msk (0x1UL << PU_PATCHENCLR_PATCH0_Pos) /*!< Bit mask of PATCH0 field. */
#define PU_PATCHENCLR_PATCH0_Disabled (0UL) /*!< Patch disabled. */
#define PU_PATCHENCLR_PATCH0_Enabled (1UL) /*!< Patch enabled. */
#define PU_PATCHENCLR_PATCH0_Clear (1UL) /*!< Disable patch on write. */
/* Peripheral: QDEC */ /* Peripheral: QDEC */
/* Description: Rotary decoder. */ /* Description: Rotary decoder. */
@ -5134,13 +4952,6 @@
#define RADIO_CRCSTATUS_CRCSTATUS_CRCError (0UL) /*!< Packet received with CRC error. */ #define RADIO_CRCSTATUS_CRCSTATUS_CRCError (0UL) /*!< Packet received with CRC error. */
#define RADIO_CRCSTATUS_CRCSTATUS_CRCOk (1UL) /*!< Packet received with CRC ok. */ #define RADIO_CRCSTATUS_CRCSTATUS_CRCOk (1UL) /*!< Packet received with CRC ok. */
/* Register: RADIO_CD */
/* Description: Carrier detect. */
/* Bit 0 : Carrier detect. */
#define RADIO_CD_CD_Pos (0UL) /*!< Position of CD field. */
#define RADIO_CD_CD_Msk (0x1UL << RADIO_CD_CD_Pos) /*!< Bit mask of CD field. */
/* Register: RADIO_RXMATCH */ /* Register: RADIO_RXMATCH */
/* Description: Received address. */ /* Description: Received address. */
@ -5962,15 +5773,6 @@
/* Peripheral: SPIM */ /* Peripheral: SPIM */
/* Description: SPI master with easyDMA 1. */ /* Description: SPI master with easyDMA 1. */
/* Register: SPIM_SHORTS */
/* Description: Shortcuts for SPIM. */
/* Bit 17 : Shortcut between END event and START task. */
#define SPIM_SHORTS_END_START_Pos (17UL) /*!< Position of END_START field. */
#define SPIM_SHORTS_END_START_Msk (0x1UL << SPIM_SHORTS_END_START_Pos) /*!< Bit mask of END_START field. */
#define SPIM_SHORTS_END_START_Disabled (0UL) /*!< Shortcut disabled. */
#define SPIM_SHORTS_END_START_Enabled (1UL) /*!< Shortcut enabled. */
/* Register: SPIM_INTENSET */ /* Register: SPIM_INTENSET */
/* Description: Interrupt enable set register. */ /* Description: Interrupt enable set register. */
@ -5988,13 +5790,6 @@
#define SPIM_INTENSET_ENDTX_Enabled (1UL) /*!< Interrupt enabled. */ #define SPIM_INTENSET_ENDTX_Enabled (1UL) /*!< Interrupt enabled. */
#define SPIM_INTENSET_ENDTX_Set (1UL) /*!< Enable interrupt on write. */ #define SPIM_INTENSET_ENDTX_Set (1UL) /*!< Enable interrupt on write. */
/* Bit 6 : Enable interrupt on END event. */
#define SPIM_INTENSET_END_Pos (6UL) /*!< Position of END field. */
#define SPIM_INTENSET_END_Msk (0x1UL << SPIM_INTENSET_END_Pos) /*!< Bit mask of END field. */
#define SPIM_INTENSET_END_Disabled (0UL) /*!< Interrupt disabled. */
#define SPIM_INTENSET_END_Enabled (1UL) /*!< Interrupt enabled. */
#define SPIM_INTENSET_END_Set (1UL) /*!< Enable interrupt on write. */
/* Bit 4 : Enable interrupt on ENDRX event. */ /* Bit 4 : Enable interrupt on ENDRX event. */
#define SPIM_INTENSET_ENDRX_Pos (4UL) /*!< Position of ENDRX field. */ #define SPIM_INTENSET_ENDRX_Pos (4UL) /*!< Position of ENDRX field. */
#define SPIM_INTENSET_ENDRX_Msk (0x1UL << SPIM_INTENSET_ENDRX_Pos) /*!< Bit mask of ENDRX field. */ #define SPIM_INTENSET_ENDRX_Msk (0x1UL << SPIM_INTENSET_ENDRX_Pos) /*!< Bit mask of ENDRX field. */
@ -6026,13 +5821,6 @@
#define SPIM_INTENCLR_ENDTX_Enabled (1UL) /*!< Interrupt enabled. */ #define SPIM_INTENCLR_ENDTX_Enabled (1UL) /*!< Interrupt enabled. */
#define SPIM_INTENCLR_ENDTX_Clear (1UL) /*!< Disable interrupt on write. */ #define SPIM_INTENCLR_ENDTX_Clear (1UL) /*!< Disable interrupt on write. */
/* Bit 6 : Disable interrupt on END event. */
#define SPIM_INTENCLR_END_Pos (6UL) /*!< Position of END field. */
#define SPIM_INTENCLR_END_Msk (0x1UL << SPIM_INTENCLR_END_Pos) /*!< Bit mask of END field. */
#define SPIM_INTENCLR_END_Disabled (0UL) /*!< Interrupt disabled. */
#define SPIM_INTENCLR_END_Enabled (1UL) /*!< Interrupt enabled. */
#define SPIM_INTENCLR_END_Clear (1UL) /*!< Disable interrupt on write. */
/* Bit 4 : Disable interrupt on ENDRX event. */ /* Bit 4 : Disable interrupt on ENDRX event. */
#define SPIM_INTENCLR_ENDRX_Pos (4UL) /*!< Position of ENDRX field. */ #define SPIM_INTENCLR_ENDRX_Pos (4UL) /*!< Position of ENDRX field. */
#define SPIM_INTENCLR_ENDRX_Msk (0x1UL << SPIM_INTENCLR_ENDRX_Pos) /*!< Bit mask of ENDRX field. */ #define SPIM_INTENCLR_ENDRX_Msk (0x1UL << SPIM_INTENCLR_ENDRX_Pos) /*!< Bit mask of ENDRX field. */
@ -6677,6 +6465,21 @@
/* Peripheral: UART */ /* Peripheral: UART */
/* Description: Universal Asynchronous Receiver/Transmitter. */ /* Description: Universal Asynchronous Receiver/Transmitter. */
/* Register: UART_SHORTS */
/* Description: Shortcuts for UART. */
/* Bit 4 : Shortcut between NCTS event and STOPRX task. */
#define UART_SHORTS_NCTS_STOPRX_Pos (4UL) /*!< Position of NCTS_STOPRX field. */
#define UART_SHORTS_NCTS_STOPRX_Msk (0x1UL << UART_SHORTS_NCTS_STOPRX_Pos) /*!< Bit mask of NCTS_STOPRX field. */
#define UART_SHORTS_NCTS_STOPRX_Disabled (0UL) /*!< Shortcut disabled. */
#define UART_SHORTS_NCTS_STOPRX_Enabled (1UL) /*!< Shortcut enabled. */
/* Bit 3 : Shortcut between CTS event and STARTRX task. */
#define UART_SHORTS_CTS_STARTRX_Pos (3UL) /*!< Position of CTS_STARTRX field. */
#define UART_SHORTS_CTS_STARTRX_Msk (0x1UL << UART_SHORTS_CTS_STARTRX_Pos) /*!< Bit mask of CTS_STARTRX field. */
#define UART_SHORTS_CTS_STARTRX_Disabled (0UL) /*!< Shortcut disabled. */
#define UART_SHORTS_CTS_STARTRX_Enabled (1UL) /*!< Shortcut enabled. */
/* Register: UART_INTENSET */ /* Register: UART_INTENSET */
/* Description: Interrupt enable set register. */ /* Description: Interrupt enable set register. */

View File

@ -1,33 +1,31 @@
/* /* Copyright (c) 2015, Nordic Semiconductor ASA
* Copyright (c) Nordic Semiconductor ASA * All rights reserved.
* All rights reserved. *
* * Redistribution and use in source and binary forms, with or without
* Redistribution and use in source and binary forms, with or without modification, * modification, are permitted provided that the following conditions are met:
* are permitted provided that the following conditions are met: *
* * * Redistributions of source code must retain the above copyright notice, this
* 1. Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer.
* list of conditions and the following disclaimer. *
* * * Redistributions in binary form must reproduce the above copyright notice,
* 2. Redistributions in binary form must reproduce the above copyright notice, this * this list of conditions and the following disclaimer in the documentation
* list of conditions and the following disclaimer in the documentation and/or * and/or other materials provided with the distribution.
* other materials provided with the distribution. *
* * * Neither the name of Nordic Semiconductor ASA nor the names of its
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other * contributors may be used to endorse or promote products derived from
* contributors to this software may be used to endorse or promote products * this software without specific prior written permission.
* derived from this software without specific prior written permission. *
* * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS *
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
#ifndef NRF51_DEPRECATED_H #ifndef NRF51_DEPRECATED_H

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
#include "ble_flash.h" #include "ble_flash.h"

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/** @file /** @file

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
#include <stdio.h> #include <stdio.h>

View File

@ -1,42 +1,8 @@
/*
* Copyright (c) Nordic Semiconductor ASA
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef _NRF_DELAY_H #ifndef _NRF_DELAY_H
#define _NRF_DELAY_H #define _NRF_DELAY_H
#include "nrf.h" #include "nrf.h"
#define asm __ASM
/*lint --e{438, 522} "Variable not used" "Function lacks side-effects" */ /*lint --e{438, 522} "Variable not used" "Function lacks side-effects" */
#if defined ( __CC_ARM ) #if defined ( __CC_ARM )
static __ASM void __INLINE nrf_delay_us(uint32_t volatile number_of_us) static __ASM void __INLINE nrf_delay_us(uint32_t volatile number_of_us)

View File

@ -1,34 +1,15 @@
/* /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this * $LastChangedRevision: 25419 $
* list of conditions and the following disclaimer in the documentation and/or */
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/** /**
* @file * @file

View File

@ -1,33 +1,14 @@
/* /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is confidential property of Nordic
* * Semiconductor ASA.Terms and conditions of usage are described in detail
* Redistribution and use in source and binary forms, with or without modification, * in NORDIC SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this * $LastChangedRevision: 13999 $
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/** /**

View File

@ -1,35 +1,14 @@
/* /* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this */
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef NRF_GPIO_H__ #ifndef NRF_GPIO_H__
#define NRF_GPIO_H__ #define NRF_GPIO_H__

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
#ifndef NRF_GPIOTE_H__ #ifndef NRF_GPIOTE_H__
#define NRF_GPIOTE_H__ #define NRF_GPIOTE_H__

View File

@ -1,34 +1,15 @@
/* /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this * $LastChangedRevision: 17685 $
* list of conditions and the following disclaimer in the documentation and/or */
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/** /**
*@file *@file

View File

@ -1,33 +1,14 @@
/* /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is confidential property of Nordic
* * Semiconductor ASA.Terms and conditions of usage are described in detail
* Redistribution and use in source and binary forms, with or without modification, * in NORDIC SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this * $LastChangedRevision: 17685 $
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/** /**

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
#ifndef NRF_TEMP_H__ #ifndef NRF_TEMP_H__

34
source/nordic_sdk/components/drivers_nrf/hal/nrf_wdt.h Executable file → Normal file
View File

@ -1,32 +1,12 @@
/* /* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA
* All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without modification, * The information contained herein is property of Nordic Semiconductor ASA.
* are permitted provided that the following conditions are met: * Terms and conditions of usage are described in detail in NORDIC
* SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* *
* 1. Redistributions of source code must retain the above copyright notice, this * Licensees are granted free, non-transferable use of the information. NO
* list of conditions and the following disclaimer. * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* * the file.
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*/ */

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/** @cond To make doxygen skip this file */ /** @cond To make doxygen skip this file */
@ -60,16 +40,16 @@ static __INLINE uint32_t pstorage_flash_page_end()
#define PSTORAGE_FLASH_PAGE_END pstorage_flash_page_end() #define PSTORAGE_FLASH_PAGE_END pstorage_flash_page_end()
#define PSTORAGE_MAX_APPLICATIONS 1 /**< Maximum number of applications that can be registered with the module, configurable based on system requirements. */ #define PSTORAGE_NUM_OF_PAGES 1 /**< Number of flash pages allocated for the pstorage module excluding the swap page, configurable based on system requirements. */
#define PSTORAGE_MIN_BLOCK_SIZE 0x0010 /**< Minimum size of block that can be registered with the module. Should be configured based on system requirements, recommendation is not have this value to be at least size of word. */ #define PSTORAGE_MIN_BLOCK_SIZE 0x0010 /**< Minimum size of block that can be registered with the module. Should be configured based on system requirements, recommendation is not have this value to be at least size of word. */
#define PSTORAGE_DATA_START_ADDR ((PSTORAGE_FLASH_PAGE_END - PSTORAGE_MAX_APPLICATIONS - 1) \ #define PSTORAGE_DATA_START_ADDR ((PSTORAGE_FLASH_PAGE_END - PSTORAGE_NUM_OF_PAGES - 1) \
* PSTORAGE_FLASH_PAGE_SIZE) /**< Start address for persistent data, configurable according to system requirements. */ * PSTORAGE_FLASH_PAGE_SIZE) /**< Start address for persistent data, configurable according to system requirements. */
#define PSTORAGE_DATA_END_ADDR ((PSTORAGE_FLASH_PAGE_END - 1) * PSTORAGE_FLASH_PAGE_SIZE) /**< End address for persistent data, configurable according to system requirements. */ #define PSTORAGE_DATA_END_ADDR ((PSTORAGE_FLASH_PAGE_END - 1) * PSTORAGE_FLASH_PAGE_SIZE) /**< End address for persistent data, configurable according to system requirements. */
#define PSTORAGE_SWAP_ADDR PSTORAGE_DATA_END_ADDR /**< Top-most page is used as swap area for clear and update. */ #define PSTORAGE_SWAP_ADDR PSTORAGE_DATA_END_ADDR /**< Top-most page is used as swap area for clear and update. */
#define PSTORAGE_MAX_BLOCK_SIZE PSTORAGE_FLASH_PAGE_SIZE /**< Maximum size of block that can be registered with the module. Should be configured based on system requirements. And should be greater than or equal to the minimum size. */ #define PSTORAGE_MAX_BLOCK_SIZE PSTORAGE_FLASH_PAGE_SIZE /**< Maximum size of block that can be registered with the module. Should be configured based on system requirements. And should be greater than or equal to the minimum size. */
#define PSTORAGE_CMD_QUEUE_SIZE 2 /**< Maximum number of flash access commands that can be maintained by the module for all applications. Configurable. */ #define PSTORAGE_CMD_QUEUE_SIZE 10 /**< Maximum number of flash access commands that can be maintained by the module for all applications. Configurable. */
/** Abstracts persistently memory block identifier. */ /** Abstracts persistently memory block identifier. */

File diff suppressed because it is too large Load Diff

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/**@file /**@file
@ -37,9 +17,9 @@
* @ingroup app_common * @ingroup app_common
* @brief Abstracted flash interface. * @brief Abstracted flash interface.
* *
* @details In order to ensure that the SDK and application be moved to alternate persistent storage * @details An abstracted interface is provided by the module to easily port the application and
* options other than the default provided with NRF solution, an abstracted interface is provided * SDK modules to an alternate option. This ensures that the SDK and application are moved
* by the module to ensure SDK modules and application can be ported to alternate option with ease. * to alternate persistent storage instead of the one provided by default.
*/ */
#ifndef PSTORAGE_H__ #ifndef PSTORAGE_H__
@ -50,19 +30,16 @@
/**@defgroup ps_opcode Persistent Storage Access Operation Codes /**@defgroup ps_opcode Persistent Storage Access Operation Codes
* @{ * @{
* @brief Persistent Storage Access Operation Codes. These are used to report any error during * @brief Persistent Storage Access Operation Codes.
* a persistent storage access operation or any general error that may occur in the
* interface.
* *
* @details Persistent Storage Access Operation Codes used in error notification callback * @details Persistent Storage Access Operation Codes are used by Persistent storage operation
* registered with the interface to report any error during an persistent storage access * completion callback @ref pstorage_ntf_cb_t to identify the operation type requested by
* operation or any general error that may occur in the interface. * the application.
*/ */
#define PSTORAGE_ERROR_OP_CODE 0x01 /**< General Error Code */ #define PSTORAGE_STORE_OP_CODE 0x01 /**< Store Operation type. */
#define PSTORAGE_STORE_OP_CODE 0x02 /**< Error when Store Operation was requested */ #define PSTORAGE_LOAD_OP_CODE 0x02 /**< Load Operation type. */
#define PSTORAGE_LOAD_OP_CODE 0x03 /**< Error when Load Operation was requested */ #define PSTORAGE_CLEAR_OP_CODE 0x03 /**< Clear Operation type. */
#define PSTORAGE_CLEAR_OP_CODE 0x04 /**< Error when Clear Operation was requested */ #define PSTORAGE_UPDATE_OP_CODE 0x04 /**< Update Operation type. */
#define PSTORAGE_UPDATE_OP_CODE 0x05 /**< Update an already touched storage block */
/**@} */ /**@} */
@ -73,146 +50,148 @@
* @details Data Types needed for interfacing with persistent memory. * @details Data Types needed for interfacing with persistent memory.
*/ */
/**@brief Persistent Storage Error Reporting Callback /**@brief Persistent storage operation completion callback function type.
* *
* @details Persistent Storage Error Reporting Callback that is used by the interface to report * @details The persistent storage operation completion callback is used by the interface to report
* success or failure of a flash operation. Therefore, for any operations, application * success or failure of a flash operation. Since data is not copied for a store operation,
* can know when the procedure was complete. For store operation, since no data copy * a callback is an indication that the resident memory can now be reused or freed.
* is made, receiving a success or failure notification, indicated by the reason
* parameter of callback is an indication that the resident memory could now be reused
* or freed, as the case may be.
*
* @param[in] handle Identifies module and block for which callback is received.
* @param[in] op_code Identifies the operation for which the event is notified.
* @param[in] result Identifies the result of flash access operation.
* NRF_SUCCESS implies, operation succeeded.
* @param[in] p_data Identifies the application data pointer. In case of store operation, this
* points to the resident source of application memory that application can now
* free or reuse. In case of clear, this is NULL as no application pointer is
* needed for this operation.
* @param[in] data_len Length data application had provided for the operation.
* *
* @param[in] handle Identifies the module and block for the callback that is received.
* @param[in] op_code Identifies the operation for the event that is notified.
* @param[in] result Identifies the result of a flash access operation. NRF_SUCCESS implies
* operation succeeded.
*
* @note Unmanaged (abnormal behaviour) error codes from the SoftDevice flash
* access API are forwarded as is and are expected to be handled by the
* application. For details refer to the implementation file and corresponding
* SoftDevice flash API documentation.
*
* @param[in] p_data Identifies the application data pointer. For a store operation, this points
* to the resident source of application memory that the application can now
* free or reuse. When there is a clear operation, this is NULL since no
* application pointer is needed for this operation.
* @param[in] data_len Length data the application provided for the operation.
*/ */
typedef void (*pstorage_ntf_cb_t)(pstorage_handle_t * p_handle, typedef void (*pstorage_ntf_cb_t)(pstorage_handle_t * p_handle,
uint8_t op_code, uint8_t op_code,
uint32_t result, uint32_t result,
uint8_t * p_data, uint8_t * p_data,
uint32_t data_len); uint32_t data_len);
/**@brief Struct containing module registration context. */
typedef struct typedef struct
{ {
pstorage_ntf_cb_t cb; /**< Callback registered with the module to be notified of any error occurring in persistent memory management */ pstorage_ntf_cb_t cb; /**< Persistent storage operation completion callback function @ref pstorage_ntf_cb_t. */
pstorage_size_t block_size; /**< Desired block size for persistent memory storage, for example, if a module has a table with 10 entries, each entry is size 64 bytes, pstorage_size_t block_size; /**< Desired block size for persistent memory storage. For example, if a module has a table with 10 entries, and each entry is 64 bytes in size,
* it can request 10 blocks with block size 64 bytes. On the other hand, the module can also request one block of size 640 based on * it can request 10 blocks with a block size of 64 bytes. The module can also request one block that is 640 bytes depending
* how it would like to access or alter memory in persistent memory. * on how it would like to access or alter the memory in persistent memory.
* First option is preferred when single entries that need to be updated often when having no impact on the other entries. * The first option is preferred when it is a single entry that needs to be updated often and doesn't impact the other entries.
* While second option is preferred when entries of table are not changed on individually but have common point of loading and storing * The second option is preferred when table entries are not changed individually but have a common point of loading and storing
* data. */ * data. */
pstorage_size_t block_count; /** Number of blocks requested by the module, minimum values is 1. */ pstorage_size_t block_count; /** Number of blocks requested by the module; minimum values is 1. */
} pstorage_module_param_t; } pstorage_module_param_t;
/**@} */ /**@} */
/**@defgroup pstorage_routines Persistent Storage Access Routines /**@defgroup pstorage_routines Persistent Storage Access Routines
* @{ * @{
* @brief Functions/Interface SDK modules use to persistently store data. * @brief Functions/Interface SDK modules used to persistently store data.
* *
* @details Interface for Application & SDK module to load/store information persistently. * @details Interface for the Application and SDK modules to load/store information persistently.
* Note: that while implementation of each of the persistent storage access function * Note: While implementation of each of the persistent storage access functions
* depends on the system and can specific to system/solution, the signature of the * depends on the system and is specific to system/solution, the signature of the
* interface routines should not be altered. * interface routines should not be altered.
*/ */
/**@brief Module Initialization Routine. /**@brief Function for initializing the module.
* *
* @details Initializes module. To be called once before any other APIs of the module are used. * @details Function for initializing the module. This function is called once before any other APIs
* of the module are used.
* *
* @retval NRF_SUCCESS on success, else an error code indicating reason for failure. * @retval NRF_SUCCESS Operation success.
*/ */
uint32_t pstorage_init(void); uint32_t pstorage_init(void);
/**@brief Function for registering with persistent storage interface.
/**@brief Register with persistent storage interface.
* *
* @param[in] p_module_param Module registration param. * @param[in] p_module_param Module registration parameter.
* @param[out] p_block_id Block identifier to identify persistent memory blocks in case * @param[out] p_block_id Block identifier to identify persistent memory blocks when
* registration succeeds. Application is expected to use the block ids * registration succeeds. Application is expected to use the block IDs
* for subsequent operations on requested persistent memory. Maximum * for subsequent operations on requested persistent memory. Maximum
* registrations permitted is determined by configuration parameter * registrations permitted is determined by the configuration of the
* PSTORAGE_MAX_APPLICATIONS. * parameter PSTORAGE_NUM_OF_PAGES. If more than one memory block is
* In case more than one memory blocks are requested, the identifier provided here is * requested, the identifier provided here is the base identifier for the
* the base identifier for the first block and to identify subsequent block, * first block and used to identify the subsequent block. The application
* application shall use \@ref pstorage_block_identifier_get with this base identifier * uses \@ref pstorage_block_identifier_get with this base identifier and
* and block number. Therefore if 10 blocks of size 64 are requested and application * block number. Therefore if 10 blocks of size 64 are requested and the
* wishes to store memory in 6th block, it shall use * application wishes to store memory in the 6th block, it shall use
* \@ref pstorage_block_identifier_get with based id and provide a block number of 5. * \@ref pstorage_block_identifier_get with the base ID and provide a
* This way application is only expected to remember the base block identifier. * block number of 5. This way the application is only expected to
* remember the base block identifier.
* *
* @note To register an area with a total size (block count * block size) larger than the * @retval NRF_SUCCESS Operation success.
* page size (usually 1024 bytes), the block size must be a divisor of the page size * @retval NRF_ERROR_INVALID_STATE Operation failure. API is called without module
* (page size % block size == 0). * initialization.
* * @retval NRF_ERROR_NULL Operation failure. NULL parameter has been passed.
* @retval NRF_SUCCESS on success, else an error code indicating reason for failure. * @retval NRF_ERROR_INVALID_PARAM Operation failure. Invalid parameter has been passed.
* @retval NRF_ERROR_INVALID_STATE is returned is API is called without module initialization. * @retval NRF_ERROR_NO_MEM Operation failure. Additional registrations can't be
* @retval NRF_ERROR_NULL if NULL parameter has been passed. * supported.
* @retval NRF_ERROR_INVALID_PARAM if invalid parameters are passed to the API.
* @retval NRF_ERROR_NO_MEM in case no more registrations can be supported.
*/ */
uint32_t pstorage_register(pstorage_module_param_t * p_module_param, uint32_t pstorage_register(pstorage_module_param_t * p_module_param,
pstorage_handle_t * p_block_id); pstorage_handle_t * p_block_id);
/**@brief Function for getting block ID with reference to base block identifier provided at the time
/** * of registration.
* @brief Function to get block id with reference to base block identifier provided at time of
* registration.
* *
* @details Function to get block id with reference to base block identifier provided at time of * @details Function to get the block ID with reference to base block identifier provided at the
* registration. * time of registration.
* In case more than one memory blocks were requested when registering, the identifier * If more than one memory block was requested when registering, the identifier provided
* provided here is the base identifier for the first block and to identify subsequent * here is the base identifier for the first block which is used to identify subsequent
* block, application shall use this routine to get block identifier providing input as * blocks. The application shall use this routine to get the block identifier, providing
* base identifier and block number. Therefore if 10 blocks of size 64 are requested and * input as base identifier and block number. Therefore, if 10 blocks of size 64 are
* application wishes to store memory in 6th block, it shall use * requested and the application wishes to store memory in the 6th block, it shall use
* \@ref pstorage_block_identifier_get with based id and provide a block number of 5. * \@ref pstorage_block_identifier_get with the base ID and provide a block number of 5.
* This way application is only expected to remember the base block identifier. * This way the application is only expected to remember the base block identifier.
* *
* @param[in] p_base_id Base block id received at the time of registration. * @param[in] p_base_id Base block ID received at the time of registration.
* @param[in] block_num Block Number, with first block numbered zero. * @param[in] block_num Block Number, with first block numbered zero.
* @param[out] p_block_id Block identifier for the block number requested in case the API succeeds. * @param[out] p_block_id Block identifier for the block number requested when the API succeeds.
* *
* @retval NRF_SUCCESS on success, else an error code indicating reason for failure. * @retval NRF_SUCCESS Operation success.
* @retval NRF_ERROR_INVALID_STATE is returned is API is called without module initialization. * @retval NRF_ERROR_INVALID_STATE Operation failure. API is called without module
* @retval NRF_ERROR_NULL if NULL parameter has been passed. * initialization.
* @retval NRF_ERROR_INVALID_PARAM if invalid parameters are passed to the API. * @retval NRF_ERROR_NULL Operation failure. NULL parameter has been passed.
* @retval NRF_ERROR_INVALID_PARAM Operation failure. Invalid parameter has been passed.
*/ */
uint32_t pstorage_block_identifier_get(pstorage_handle_t * p_base_id, uint32_t pstorage_block_identifier_get(pstorage_handle_t * p_base_id,
pstorage_size_t block_num, pstorage_size_t block_num,
pstorage_handle_t * p_block_id); pstorage_handle_t * p_block_id);
/**@brief Function for persistently storing data of length 'size' contained in the 'p_src' address
/**@brief Routine to persistently store data of length 'size' contained in 'p_src' address * in the storage module at 'p_dest' address. Equivalent to Storage Write.
* in storage module at 'p_dest' address; Equivalent to Storage Write.
* *
* @param[in] p_dest Destination address where data is to be stored persistently. * @param[in] p_dest Destination address where data is to be stored persistently.
* @param[in] p_src Source address containing data to be stored. API assumes this to be resident * @param[in] p_src Source address containing data to be stored. API assumes this to be resident
* memory and no intermediate copy of data is made by the API. * memory and no intermediate copy of data is made by the API. Must be word
* @param[in] size Size of data to be stored expressed in bytes. Should be word aligned. * aligned.
* @param[in] size Size of data to be stored expressed in bytes. Must be word aligned and size +
* offset must be <= block size.
* @param[in] offset Offset in bytes to be applied when writing to the block. * @param[in] offset Offset in bytes to be applied when writing to the block.
* For example, if within a block of 100 bytes, application wishes to * For example, if within a block of 100 bytes, the application wishes to
* write 20 bytes at offset of 12, then this field should be set to 12. * write 20 bytes at an offset of 12, then this field should be set to 12.
* Should be word aligned. * Must be word aligned.
* *
* @retval NRF_SUCCESS on success, else an error code indicating reason for failure. * @retval NRF_SUCCESS Operation success.
* @retval NRF_ERROR_INVALID_STATE is returned is API is called without module initialization. * @retval NRF_ERROR_INVALID_STATE Operation failure. API is called without module
* @retval NRF_ERROR_NULL if NULL parameter has been passed. * initialization.
* @retval NRF_ERROR_INVALID_PARAM if invalid parameters are passed to the API. * @retval NRF_ERROR_NULL Operation failure. NULL parameter has been passed.
* @retval NRF_ERROR_INVALID_ADDR in case data address 'p_src' is not aligned. * @retval NRF_ERROR_INVALID_PARAM Operation failure. Invalid parameter has been passed.
* @retval NRF_ERROR_NO_MEM in case request cannot be processed. * @retval NRF_ERROR_INVALID_ADDR Operation failure. Parameter is not aligned.
* @retval NRF_ERROR_NO_MEM Operation failure. No storage space available.
* *
* @warning No copy of the data is made, and hence memory provided for data source to be written * @warning No copy of the data is made, meaning memory provided for the data source that is to
* to flash cannot be freed or reused by the application until this procedure * be written to flash cannot be freed or reused by the application until this procedure
* is complete. End of this procedure is notified to the application using the * is complete. The application is notified when the procedure is finished using the
* notification callback registered by the application. * notification callback registered by the application.
*/ */
uint32_t pstorage_store(pstorage_handle_t * p_dest, uint32_t pstorage_store(pstorage_handle_t * p_dest,
@ -220,28 +199,30 @@ uint32_t pstorage_store(pstorage_handle_t * p_dest,
pstorage_size_t size, pstorage_size_t size,
pstorage_size_t offset); pstorage_size_t offset);
/**@brief Routine to update persistently stored data of length 'size' contained in 'p_src' address /**@brief Function for updating persistently stored data of length 'size' contained in the 'p_src'
* in storage module at 'p_dest' address. * address in the storage module at 'p_dest' address.
* *
* @param[in] p_dest Destination address where data is to be updated. * @param[in] p_dest Destination address where data is to be updated.
* @param[in] p_src Source address containing data to be stored. API assumes this to be resident * @param[in] p_src Source address containing data to be stored. API assumes this to be resident
* memory and no intermediate copy of data is made by the API. * memory and no intermediate copy of data is made by the API.
* @param[in] size Size of data to be stored expressed in bytes. Should be word aligned. * @param[in] size Size of data to be stored expressed in bytes. Must be word aligned and size +
* offset must be <= block size.
* @param[in] offset Offset in bytes to be applied when writing to the block. * @param[in] offset Offset in bytes to be applied when writing to the block.
* For example, if within a block of 100 bytes, application wishes to * For example, if within a block of 100 bytes, the application wishes to
* write 20 bytes at offset of 12, then this field should be set to 12. * write 20 bytes at an offset of 12 bytes, then this field should be set to 12.
* Should be word aligned. * Must be word aligned.
* *
* @retval NRF_SUCCESS on success, else an error code indicating reason for failure. * @retval NRF_SUCCESS Operation success.
* @retval NRF_ERROR_INVALID_STATE is returned is API is called without module initialization. * @retval NRF_ERROR_INVALID_STATE Operation failure. API is called without module
* @retval NRF_ERROR_NULL if NULL parameter has been passed. * initialization.
* @retval NRF_ERROR_INVALID_PARAM if invalid parameters are passed to the API. * @retval NRF_ERROR_NULL Operation failure. NULL parameter has been passed.
* @retval NRF_ERROR_INVALID_ADDR in case data address 'p_src' is not aligned. * @retval NRF_ERROR_INVALID_PARAM Operation failure. Invalid parameter has been passed.
* @retval NRF_ERROR_NO_MEM in case request cannot be processed. * @retval NRF_ERROR_INVALID_ADDR Operation failure. Parameter is not aligned.
* @retval NRF_ERROR_NO_MEM Operation failure. No storage space available.
* *
* @warning No copy of the data is made, and hence memory provided for data source to be written * @warning No copy of the data is made, meaning memory provided for the data source that is to
* to flash cannot be freed or reused by the application until this procedure * be written to flash cannot be freed or reused by the application until this procedure
* is complete. End of this procedure is notified to the application using the * is complete. The application is notified when the procedure is finished using the
* notification callback registered by the application. * notification callback registered by the application.
*/ */
uint32_t pstorage_update(pstorage_handle_t * p_dest, uint32_t pstorage_update(pstorage_handle_t * p_dest,
@ -249,68 +230,150 @@ uint32_t pstorage_update(pstorage_handle_t * p_dest,
pstorage_size_t size, pstorage_size_t size,
pstorage_size_t offset); pstorage_size_t offset);
/**@brief Routine to load persistently stored data of length 'size' from 'p_src' address /**@brief Function for loading persistently stored data of length 'size' from 'p_src' address
* to 'p_dest' address; Equivalent to Storage Read. * to 'p_dest' address. Equivalent to Storage Read.
* *
* @param[in] p_dest Destination address where persistently stored data is to be loaded. * @param[in] p_dest Destination address where persistently stored data is to be loaded.
* @param[in] p_src Source from where data is to be loaded from persistent memory. * @param[in] p_src Source where data is loaded from persistent memory.
* @param[in] size Size of data to be loaded from persistent memory expressed in bytes. * @param[in] size Size of data to be loaded from persistent memory expressed in bytes.
* Should be word aligned. * Should be word aligned.
* @param[in] offset Offset in bytes to be applied when loading from the block. * @param[in] offset Offset in bytes, to be applied when loading from the block.
* For example, if within a block of 100 bytes, application wishes to * For example, if within a block of 100 bytes, the application wishes to
* load 20 bytes from offset of 12, then this field should be set to 12. * load 20 bytes from offset of 12 bytes, then this field should be set to 12.
* Should be word aligned. * Should be word aligned.
* *
* @retval NRF_SUCCESS on success, else an error code indicating reason for failure. * @retval NRF_SUCCESS Operation success.
* @retval NRF_ERROR_INVALID_STATE is returned is API is called without module initialization. * @retval NRF_ERROR_INVALID_STATE Operation failure. API is called without module
* @retval NRF_ERROR_NULL if NULL parameter has been passed. * initialization.
* @retval NRF_ERROR_INVALID_PARAM if invalid parameters are passed to the API. * @retval NRF_ERROR_NULL Operation failure. NULL parameter has been passed.
* @retval NRF_ERROR_INVALID_ADDR in case data address 'p_dst' is not aligned. * @retval NRF_ERROR_INVALID_PARAM Operation failure. Invalid parameter has been passed.
* @retval NRF_ERROR_NO_MEM in case request cannot be processed. * @retval NRF_ERROR_INVALID_ADDR Operation failure. Parameter is not aligned.
* @retval NRF_ERROR_NO_MEM Operation failure. No storage space available.
*/ */
uint32_t pstorage_load(uint8_t * p_dest, uint32_t pstorage_load(uint8_t * p_dest,
pstorage_handle_t * p_src, pstorage_handle_t * p_src,
pstorage_size_t size, pstorage_size_t size,
pstorage_size_t offset); pstorage_size_t offset);
/**@brief Routine to clear data in persistent memory. /**@brief Function for clearing data in persistent memory.
*
* @param[in] p_base_id Base block identifier in persistent memory that needs to cleared;
* Equivalent to an Erase Operation.
* *
* @param[in] p_base_id Base block identifier in persistent memory that needs to be cleared;
* equivalent to an Erase Operation.
* @param[in] size Size of data to be cleared from persistent memory expressed in bytes. * @param[in] size Size of data to be cleared from persistent memory expressed in bytes.
* This parameter is to provision for clearing of certain blocks * This parameter is to provision for clearing of certain blocks
* of memory, or all memory blocks in a registered module. If the total size * of memory, or all memory blocks in a registered module. If the total size
* of the application module is used (blocks * block size) in combination with * of the application module is used (blocks * block size) in combination with
* the identifier for the first block in the module, all blocks in the * the identifier for the first block in the module, all blocks in the
* module will be erased. * module will be erased. Must be multiple of block size.
* *
* @retval NRF_SUCCESS on success, else an error code indicating reason for failure. * @retval NRF_SUCCESS Operation success.
* @retval NRF_ERROR_INVALID_STATE is returned is API is called without module initialization. * @retval NRF_ERROR_INVALID_STATE Operation failure. API is called without module
* @retval NRF_ERROR_NULL if NULL parameter has been passed. * initialization.
* @retval NRF_ERROR_INVALID_PARAM if invalid parameters are passed to the API. * @retval NRF_ERROR_NULL Operation failure. NULL parameter has been passed.
* @retval NRF_ERROR_INVALID_ADDR in case data address 'p_dst' is not aligned. * @retval NRF_ERROR_INVALID_PARAM Operation failure. Invalid parameter has been passed.
* @retval NRF_ERROR_NO_MEM in case request cannot be processed. * @retval NRF_ERROR_INVALID_ADDR Operation failure. Parameter is not aligned.
* @retval NRF_ERROR_NO_MEM Operation failure. No storage space available.
* *
* @note Clear operations may take time. This API however, does not block until the clear * @note Clear operations may take time. This API however, does not block until the clear
* procedure is complete. Application is notified of procedure completion using * procedure is complete. The application is notified of procedure completion using
* notification callback registered by the application. 'result' parameter of the * a notification callback registered by the application. The 'result' parameter of the
* callback suggests if the procedure was successful or not. * callback indicates if the procedure was successful or not.
*/ */
uint32_t pstorage_clear(pstorage_handle_t * p_base_id, pstorage_size_t size); uint32_t pstorage_clear(pstorage_handle_t * p_base_id, pstorage_size_t size);
/** /**@brief Function for getting the number of pending operations with the module.
* @brief API to get status of number of pending operations with the module.
* *
* @param[out] p_count Number of storage operations pending with the module, if 0, * @param[out] p_count Number of storage operations pending with the module. If 0, there are no
* there are no outstanding requests. * outstanding requests.
* *
* @retval NRF_SUCCESS on success, else an error code indicating reason for failure. * @retval NRF_SUCCESS Operation success.
* @retval NRF_ERROR_INVALID_STATE is returned is API is called without module initialization. * @retval NRF_ERROR_INVALID_STATE Operation failure. API is called without module
* @retval NRF_ERROR_NULL if NULL parameter has been passed. * initialization.
* @retval NRF_ERROR_NULL Operation failure. NULL parameter has been passed.
*/ */
uint32_t pstorage_access_status_get(uint32_t * p_count); uint32_t pstorage_access_status_get(uint32_t * p_count);
#ifdef PSTORAGE_RAW_MODE_ENABLE
/**@brief Function for registering with the persistent storage interface.
*
* @param[in] p_module_param Module registration parameter.
* @param[out] p_block_id Block identifier used to identify persistent memory blocks upon
* successful registration. The application is expected to use the block
* IDs for subsequent operations on requested persistent memory. When
* more than one memory block is requested, this identifier is the base
* identifier for the first block and used to identify subsequent blocks.
* The application shall use \@ref pstorage_block_identifier_get with
* this base identifier and block number. Therefore if 10 blocks of size
* 64 are requested and the application wishes to store memory in the 6th
* block, it shall use \@ref pstorage_block_identifier_get with the base
* ID and provide a block number of 5. Therefore, the application is only
* expected to remember the base block identifier.
*
* @retval NRF_SUCCESS Operation success.
* @retval NRF_ERROR_INVALID_STATE Operation failure. API is called without module
* initialization.
* @retval NRF_ERROR_NULL Operation failure. NULL parameter has been passed.
* @retval NRF_ERROR_INVALID_PARAM Operation failure. Invalid parameter has been passed.
* @retval NRF_ERROR_NO_MEM Operation failure. No storage space available.
*/
uint32_t pstorage_raw_register(pstorage_module_param_t * p_module_param,
pstorage_handle_t * p_block_id);
/**@brief Function for persistently storing data of length 'size' contained in 'p_src' address in
* storage module at 'p_dest' address. Equivalent to Storage Write.
*
* @param[in] p_dest Destination address where data is to be stored persistently.
* @param[in] p_src Source address containing data to be stored. The API assumes this is resident
* memory and no intermediate copy of data is made by the API. Must be word
* aligned.
* @param[in] size Size of data to be stored expressed in bytes. Must be word aligned.
* @param[in] offset Offset in bytes to be applied when writing to the block.
* For example, if within a block of 100 bytes, the application wishes to
* write 20 bytes at an offset of 12 bytes, this field should be set to 12.
* Must be word aligned.
*
* @retval NRF_SUCCESS Operation success.
* @retval NRF_ERROR_INVALID_STATE Operation failure. API is called without module
* initialization.
* @retval NRF_ERROR_NULL Operation failure. NULL parameter has been passed.
* @retval NRF_ERROR_INVALID_PARAM Operation failure. Invalid parameter has been passed.
* @retval NRF_ERROR_INVALID_ADDR Operation failure. Parameter is not aligned.
* @retval NRF_ERROR_NO_MEM Operation failure. No storage space available.
*
* @warning No copy of the data is made, meaning memory provided for data source that is to be
* written to flash cannot be freed or reused by the application until this procedure
* is complete. The application is notified when the procedure is finished using the
* notification callback registered by the application.
*/
uint32_t pstorage_raw_store(pstorage_handle_t * p_dest,
uint8_t * p_src,
pstorage_size_t size,
pstorage_size_t offset);
/**@brief Function for clearing data in persistent memory in raw mode.
*
* @param[in] p_dest Base block identifier in persistent memory that needs to be cleared.
* Equivalent to an Erase Operation.
* @param[in] size Size of data to be cleared from persistent memory expressed in bytes.
* Not used.
*
* @retval NRF_SUCCESS Operation success.
* @retval NRF_ERROR_INVALID_STATE Operation failure. API is called without module
* initialization.
* @retval NRF_ERROR_NULL Operation failure. NULL parameter has been passed.
* @retval NRF_ERROR_INVALID_PARAM Operation failure. Invalid parameter has been passed.
* @retval NRF_ERROR_NO_MEM Operation failure. No storage space available.
*
* @note Clear operations may take time. This API, however, does not block until the clear
* procedure is complete. The application is notified of procedure completion using
* a notification callback registered by the application. The 'result' parameter of the
* callback indicates if the procedure was successful or not.
*/
uint32_t pstorage_raw_clear(pstorage_handle_t * p_dest, pstorage_size_t size);
#endif // PSTORAGE_RAW_MODE_ENABLE
/**@} */ /**@} */
/**@} */ /**@} */

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/**@file /**@file

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/**@file /**@file

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
#include "bootloader_util.h" #include "bootloader_util.h"

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/**@file /**@file

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/**@file /**@file

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
#include "dfu_app_handler.h" #include "dfu_app_handler.h"

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/** @file /** @file

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/**@file /**@file

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/** @file /** @file

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/** @file /** @file

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/**@file /**@file

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/**@file /**@file
@ -137,8 +117,8 @@ uint32_t dfu_init_prevalidate(uint8_t * p_init_data, uint32_t init_data_len)
// error is returned. // error is returned.
while (i < p_init_packet->softdevice_len) while (i < p_init_packet->softdevice_len)
{ {
if (p_init_packet->softdevice[i] == DFU_SOFTDEVICE_ANY || if (p_init_packet->softdevice[i] == DFU_SOFTDEVICE_ANY ||
p_init_packet->softdevice[i++] == SOFTDEVICE_INFORMATION->firmware_id) p_init_packet->softdevice[i++] == SD_FWID_GET(MBR_SIZE))
{ {
return NRF_SUCCESS; return NRF_SUCCESS;
} }
@ -151,7 +131,6 @@ uint32_t dfu_init_prevalidate(uint8_t * p_init_data, uint32_t init_data_len)
uint32_t dfu_init_postvalidate(uint8_t * p_image, uint32_t image_len) uint32_t dfu_init_postvalidate(uint8_t * p_image, uint32_t image_len)
{ {
#if NEED_CRC_CHECK /* disabled for now */
uint16_t image_crc; uint16_t image_crc;
uint16_t received_crc; uint16_t received_crc;
@ -170,7 +149,6 @@ uint32_t dfu_init_postvalidate(uint8_t * p_image, uint32_t image_len)
{ {
return NRF_ERROR_INVALID_DATA; return NRF_ERROR_INVALID_DATA;
} }
#endif /* NEED_CRC_CHECK */
return NRF_SUCCESS; return NRF_SUCCESS;
} }

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/**@file /**@file

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/**@file /**@file
@ -44,32 +24,32 @@
#define DFU_TYPES_H__ #define DFU_TYPES_H__
#include <stdint.h> #include <stdint.h>
#include "nrf51.h" #include "nrf_sdm.h"
#include "nrf.h"
#include "app_util.h" #include "app_util.h"
/**@brief Structure holding SoftDevice information to be used by the Bootloader/DFU.
* Only size field is used.
*/
typedef struct
{
uint8_t info_size; /**< Not used. */
uint8_t reserved1[3]; /**< Not used. */
uint32_t magic_number; /**< Not used. */
uint32_t softdevice_size; /**< Size field containing the size of installed SoftDevice. */
uint16_t firmware_id; /**< Firmware id. */
uint8_t reserved2[2]; /**< Not used. */
} SOFTDEVICE_INFORMATION_Type;
#define SOFTDEVICE_INFORMATION_BASE 0x0003000 /**< Location in the SoftDevice image which holds the SoftDevice informations. */
#define SOFTDEVICE_INFORMATION ((SOFTDEVICE_INFORMATION_Type *) SOFTDEVICE_INFORMATION_BASE) /**< Make SoftDevice information accessible through the structure. */
#define NRF_UICR_BOOT_START_ADDRESS (NRF_UICR_BASE + 0x14) /**< Register where the bootloader start address is stored in the UICR register. */ #define NRF_UICR_BOOT_START_ADDRESS (NRF_UICR_BASE + 0x14) /**< Register where the bootloader start address is stored in the UICR register. */
#define CODE_REGION_1_START SOFTDEVICE_INFORMATION->softdevice_size /**< This field should correspond to the size of Code Region 0, (which is identical to Start of Code Region 1), found in UICR.CLEN0 register. This value is used for compile safety, as the linker will fail if application expands into bootloader. Runtime, the bootloader will use the value found in UICR.CLEN0. */ #define CODE_REGION_1_START SD_SIZE_GET(MBR_SIZE) /**< This field should correspond to the size of Code Region 0, (which is identical to Start of Code Region 1), found in UICR.CLEN0 register. This value is used for compile safety, as the linker will fail if application expands into bootloader. Runtime, the bootloader will use the value found in UICR.CLEN0. */
#define SOFTDEVICE_REGION_START MBR_SIZE /**< This field should correspond to start address of the bootloader, found in UICR.RESERVED, 0x10001014, register. This value is used for sanity check, so the bootloader will fail immediately if this value differs from runtime value. The value is used to determine max application size for updating. */
#define SOFTDEVICE_REGION_START 0x00001000 /**< This field should correspond to start address of the bootloader, found in UICR.RESERVED, 0x10001014, register. This value is used for sanity check, so the bootloader will fail immediately if this value differs from runtime value. The value is used to determine max application size for updating. */ #ifdef NRF51
#ifdef SIGNING
#define BOOTLOADER_REGION_START 0x00039C00 /**< This field should correspond to start address of the bootloader, found in UICR.RESERVED, 0x10001014, register. This value is used for sanity check, so the bootloader will fail immediately if this value differs from runtime value. The value is used to determine max application size for updating. */
#define BOOTLOADER_SETTINGS_ADDRESS 0x0003D800 /**< The field specifies the page location of the bootloader settings address. */
#else
#define BOOTLOADER_REGION_START 0x0003C000 /**< This field should correspond to start address of the bootloader, found in UICR.RESERVED, 0x10001014, register. This value is used for sanity check, so the bootloader will fail immediately if this value differs from runtime value. The value is used to determine max application size for updating. */ #define BOOTLOADER_REGION_START 0x0003C000 /**< This field should correspond to start address of the bootloader, found in UICR.RESERVED, 0x10001014, register. This value is used for sanity check, so the bootloader will fail immediately if this value differs from runtime value. The value is used to determine max application size for updating. */
#define BOOTLOADER_SETTINGS_ADDRESS 0x0003FC00 /**< The field specifies the page location of the bootloader settings address. */ #define BOOTLOADER_SETTINGS_ADDRESS 0x0003FC00 /**< The field specifies the page location of the bootloader settings address. */
#endif
#define CODE_PAGE_SIZE 0x0400 /**< Size of a flash codepage. Used for size of the reserved flash space in the bootloader region. Will be runtime checked against NRF_UICR->CODEPAGESIZE to ensure the region is correct. */
#elif NRF52
#define BOOTLOADER_REGION_START 0x0003B000 /**< This field should correspond to start address of the bootloader, found in UICR.RESERVED, 0x10001014, register. This value is used for sanity check, so the bootloader will fail immediately if this value differs from runtime value. The value is used to determine max application size for updating. */
#define BOOTLOADER_SETTINGS_ADDRESS 0x0007F000 /**< The field specifies the page location of the bootloader settings address. */
#define CODE_PAGE_SIZE 0x1000 /**< Size of a flash codepage. Used for size of the reserved flash space in the bootloader region. Will be runtime checked against NRF_UICR->CODEPAGESIZE to ensure the region is correct. */
#else
#error No target defined
#endif
#define DFU_REGION_TOTAL_SIZE (BOOTLOADER_REGION_START - CODE_REGION_1_START) /**< Total size of the region between SD and Bootloader. */ #define DFU_REGION_TOTAL_SIZE (BOOTLOADER_REGION_START - CODE_REGION_1_START) /**< Total size of the region between SD and Bootloader. */
@ -85,7 +65,6 @@ typedef struct
#define DFU_BANK_0_REGION_START CODE_REGION_1_START /**< Bank 0 region start. */ #define DFU_BANK_0_REGION_START CODE_REGION_1_START /**< Bank 0 region start. */
#define DFU_BANK_1_REGION_START (DFU_BANK_0_REGION_START + DFU_IMAGE_MAX_SIZE_BANKED) /**< Bank 1 region start. */ #define DFU_BANK_1_REGION_START (DFU_BANK_0_REGION_START + DFU_IMAGE_MAX_SIZE_BANKED) /**< Bank 1 region start. */
#define CODE_PAGE_SIZE 0x0400 /**< Size of a flash codepage. Used for size of the reserved flash space in the bootloader region. Will be runtime checked against NRF_UICR->CODEPAGESIZE to ensure the region is correct. */
#define EMPTY_FLASH_MASK 0xFFFFFFFF /**< Bit mask that defines an empty address in flash. */ #define EMPTY_FLASH_MASK 0xFFFFFFFF /**< Bit mask that defines an empty address in flash. */
#define INVALID_PACKET 0x00 /**< Invalid packet identifies. */ #define INVALID_PACKET 0x00 /**< Invalid packet identifies. */

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/** @file /** @file
@ -42,10 +22,10 @@
#ifndef MEM_POOL_INTERNAL_H__ #ifndef MEM_POOL_INTERNAL_H__
#define MEM_POOL_INTERNAL_H__ #define MEM_POOL_INTERNAL_H__
#define TX_BUF_SIZE 4u /**< TX buffer size in bytes. */ #define TX_BUF_SIZE 32u /**< TX buffer size in bytes. */
#define RX_BUF_SIZE 32u /**< RX buffer size in bytes. */ #define RX_BUF_SIZE 600u /**< RX buffer size in bytes. */
#define RX_BUF_QUEUE_SIZE 8u /**< RX buffer element size. */ #define RX_BUF_QUEUE_SIZE 2u /**< RX buffer element size. */
#endif // MEM_POOL_INTERNAL_H__ #endif // MEM_POOL_INTERNAL_H__

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
#include "crc16.h" #include "crc16.h"

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/** @file /** @file

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
#include "hci_mem_pool.h" #include "hci_mem_pool.h"

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/** @file /** @file

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
#include "app_scheduler.h" #include "app_scheduler.h"

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/** @file /** @file
@ -59,7 +39,7 @@
* scheduler's queue. The app_sched_execute() function will pull this event and call its * scheduler's queue. The app_sched_execute() function will pull this event and call its
* handler in the main context. * handler in the main context.
* *
* @if (SD_S110 && !SD_S310) * @if (PERIPHERAL)
* For an example usage of the scheduler, see the implementations of * For an example usage of the scheduler, see the implementations of
* @ref ble_sdk_app_hids_mouse and @ref ble_sdk_app_hids_keyboard. * @ref ble_sdk_app_hids_mouse and @ref ble_sdk_app_hids_keyboard.
* @endif * @endif
@ -72,6 +52,7 @@
#include <stdint.h> #include <stdint.h>
#include "app_error.h" #include "app_error.h"
#include "app_util.h"
#define APP_SCHED_EVENT_HEADER_SIZE 8 /**< Size of app_scheduler.event_header_t (only for use inside APP_SCHED_BUF_SIZE()). */ #define APP_SCHED_EVENT_HEADER_SIZE 8 /**< Size of app_scheduler.event_header_t (only for use inside APP_SCHED_BUF_SIZE()). */

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/** @file /** @file

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/** @file /** @file

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/** @file /** @file

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/** @file /** @file
@ -53,30 +33,66 @@ enum
UNIT_10_MS = 10000 /**< Number of microseconds in 10 milliseconds. */ UNIT_10_MS = 10000 /**< Number of microseconds in 10 milliseconds. */
}; };
/**@brief Macro for doing static (i.e. compile time) assertion.
*
* @note If the assertion fails when compiling using Keil, the compiler will report error message
* "error: #94: the size of an array must be greater than zero" (while gcc will list the
* symbol static_assert_failed, making the error message more readable).
* If the supplied expression can not be evaluated at compile time, Keil will report
* "error: #28: expression must have a constant value".
*
* @note The macro is intentionally implemented not using do while(0), allowing it to be used
* outside function blocks (e.g. close to global type- and variable declarations).
* If used in a code block, it must be used before any executable code in this block.
*
* @param[in] EXPR Constant expression to be verified.
*/
#if defined(__GNUC__) /**@brief Implementation specific macro for delayed macro expansion used in string concatenation
#define STATIC_ASSERT(EXPR) typedef char __attribute__((unused)) static_assert_failed[(EXPR) ? 1 : -1] *
#elif defined(__ICCARM__) * @param[in] lhs Left hand side in concatenation
#define STATIC_ASSERT(EXPR) extern char static_assert_failed[(EXPR) ? 1 : -1] * @param[in] rhs Right hand side in concatenation
*/
#define STRING_CONCATENATE_IMPL(lhs, rhs) lhs ## rhs
/**@brief Macro used to concatenate string using delayed macro expansion
*
* @note This macro will delay concatenation until the expressions have been resolved
*
* @param[in] lhs Left hand side in concatenation
* @param[in] rhs Right hand side in concatenation
*/
#define STRING_CONCATENATE(lhs, rhs) STRING_CONCATENATE_IMPL(lhs, rhs)
// Disable lint-warnings/errors for STATIC_ASSERT
//lint --emacro(10,STATIC_ASSERT)
//lint --emacro(18,STATIC_ASSERT)
//lint --emacro(19,STATIC_ASSERT)
//lint --emacro(30,STATIC_ASSERT)
//lint --emacro(37,STATIC_ASSERT)
//lint --emacro(42,STATIC_ASSERT)
//lint --emacro(26,STATIC_ASSERT)
//lint --emacro(102,STATIC_ASSERT)
//lint --emacro(533,STATIC_ASSERT)
//lint --emacro(534,STATIC_ASSERT)
//lint --emacro(132,STATIC_ASSERT)
//lint --emacro(414,STATIC_ASSERT)
//lint --emacro(578,STATIC_ASSERT)
//lint --emacro(628,STATIC_ASSERT)
//lint --emacro(648,STATIC_ASSERT)
//lint --emacro(830,STATIC_ASSERT)
/**@brief Macro for doing static (i.e. compile time) assertion.
*
* @note If the EXPR isn't resolvable, then the error message won't be shown.
*
* @note The output of STATIC_ASSERT_MSG will be different across different compilers.
*
* @param[in] EXPR Constant expression to be verified.
*/
#if defined ( __COUNTER__ )
#define STATIC_ASSERT(EXPR) \
;enum { STRING_CONCATENATE(static_assert_, __COUNTER__) = 1/(!!(EXPR)) }
#else #else
#define STATIC_ASSERT(EXPR) typedef char static_assert_failed[(EXPR) ? 1 : -1]
#define STATIC_ASSERT(EXPR) \
;enum { STRING_CONCATENATE(assert_line_, __LINE__) = 1/(!!(EXPR)) }
#endif #endif
/**@brief type for holding an encoded (i.e. little endian) 16 bit unsigned integer. */ /**@brief type for holding an encoded (i.e. little endian) 16 bit unsigned integer. */
typedef uint8_t uint16_le_t[2]; typedef uint8_t uint16_le_t[2];

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
#include "app_util_platform.h" #include "app_util_platform.h"

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/**@file /**@file

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2009 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
#ifndef COMMON_H #ifndef COMMON_H

View File

@ -1,33 +1,12 @@
/* /* Copyright (c) 2008 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/** @file /** @file

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2006 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
#include "nrf_assert.h" #include "nrf_assert.h"

View File

@ -1,33 +1,10 @@
/* /*
* Copyright (c) Nordic Semiconductor ASA * Copyright (c) 2006 Nordic Semiconductor. All Rights Reserved.
* All rights reserved. *
* * The information contained herein is confidential property of Nordic Semiconductor. The use,
* Redistribution and use in source and binary forms, with or without modification, * copying, transfer or disclosure of such information is prohibited except by express written
* are permitted provided that the following conditions are met: * agreement with Nordic Semiconductor.
* *
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/** @file /** @file

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/** @cond */ /** @cond */

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/**@file /**@file

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/** @cond */ /** @cond */

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/**@file /**@file

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/**@file /**@file
@ -42,7 +22,6 @@
#ifndef BLE_STACK_HANDLER_TYPES_H__ #ifndef BLE_STACK_HANDLER_TYPES_H__
#define BLE_STACK_HANDLER_TYPES_H__ #define BLE_STACK_HANDLER_TYPES_H__
#define BLE_STACK_SUPPORT_REQD
#ifdef BLE_STACK_SUPPORT_REQD #ifdef BLE_STACK_SUPPORT_REQD
#include <stdlib.h> #include <stdlib.h>

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
#include "softdevice_handler.h" #include "softdevice_handler.h"

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/** @file /** @file

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
#include "softdevice_handler_appsh.h" #include "softdevice_handler_appsh.h"

View File

@ -1,33 +1,13 @@
/* /* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved.
* Copyright (c) Nordic Semiconductor ASA *
* All rights reserved. * The information contained herein is property of Nordic Semiconductor ASA.
* * Terms and conditions of usage are described in detail in NORDIC
* Redistribution and use in source and binary forms, with or without modification, * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
* are permitted provided that the following conditions are met: *
* * Licensees are granted free, non-transferable use of the information. NO
* 1. Redistributions of source code must retain the above copyright notice, this * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* list of conditions and the following disclaimer. * the file.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
#ifndef SOFTDEVICE_HANDLER_APPSH_H #ifndef SOFTDEVICE_HANDLER_APPSH_H

View File

@ -1,33 +1,37 @@
/* /*
* Copyright (c) Nordic Semiconductor ASA * Copyright (c) Nordic Semiconductor ASA
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without modification, * Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met: * are permitted provided that the following conditions are met:
* *
* 1. Redistributions of source code must retain the above copyright notice, this * 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer. * list of conditions and the following disclaimer.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this * 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or * list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution. * other materials provided with the distribution.
* *
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other * 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products * contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* * 4. This software must only be used in a processor manufactured by Nordic
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * Semiconductor ASA, or in a processor manufactured by a third party that
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * is used in combination with a processor manufactured by Nordic Semiconductor.
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR *
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/** /**

View File

@ -1,33 +1,37 @@
/* /*
* Copyright (c) Nordic Semiconductor ASA * Copyright (c) Nordic Semiconductor ASA
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without modification, * Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met: * are permitted provided that the following conditions are met:
* *
* 1. Redistributions of source code must retain the above copyright notice, this * 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer. * list of conditions and the following disclaimer.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this * 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or * list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution. * other materials provided with the distribution.
* *
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other * 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products * contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* * 4. This software must only be used in a processor manufactured by Nordic
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * Semiconductor ASA, or in a processor manufactured by a third party that
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * is used in combination with a processor manufactured by Nordic Semiconductor.
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR *
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/** /**

View File

@ -1,33 +1,37 @@
/* /*
* Copyright (c) Nordic Semiconductor ASA * Copyright (c) Nordic Semiconductor ASA
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without modification, * Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met: * are permitted provided that the following conditions are met:
* *
* 1. Redistributions of source code must retain the above copyright notice, this * 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer. * list of conditions and the following disclaimer.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this * 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or * list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution. * other materials provided with the distribution.
* *
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other * 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products * contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* * 4. This software must only be used in a processor manufactured by Nordic
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * Semiconductor ASA, or in a processor manufactured by a third party that
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * is used in combination with a processor manufactured by Nordic Semiconductor.
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR *
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/** /**
@ -547,9 +551,7 @@ typedef struct
{ {
ble_gap_addr_t peer_addr; /**< Bluetooth address of the peer device. */ ble_gap_addr_t peer_addr; /**< Bluetooth address of the peer device. */
ble_gap_addr_t own_addr; /**< Bluetooth address of the local device used during connection setup. */ ble_gap_addr_t own_addr; /**< Bluetooth address of the local device used during connection setup. */
#if !defined(TARGET_MCU_NRF51_16K_S110) && !defined(TARGET_MCU_NRF51_32K_S110)
uint8_t role; /**< BLE role for this connection, see @ref BLE_GAP_ROLES */ uint8_t role; /**< BLE role for this connection, see @ref BLE_GAP_ROLES */
#endif
uint8_t irk_match :1; /**< If 1, peer device's address resolved using an IRK. */ uint8_t irk_match :1; /**< If 1, peer device's address resolved using an IRK. */
uint8_t irk_match_idx :7; /**< Index in IRK list where the address was matched. */ uint8_t irk_match_idx :7; /**< Index in IRK list where the address was matched. */
ble_gap_conn_params_t conn_params; /**< GAP Connection Parameters. */ ble_gap_conn_params_t conn_params; /**< GAP Connection Parameters. */

View File

@ -1,33 +1,37 @@
/* /*
* Copyright (c) Nordic Semiconductor ASA * Copyright (c) Nordic Semiconductor ASA
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without modification, * Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met: * are permitted provided that the following conditions are met:
* *
* 1. Redistributions of source code must retain the above copyright notice, this * 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer. * list of conditions and the following disclaimer.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this * 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or * list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution. * other materials provided with the distribution.
* *
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other * 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products * contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* * 4. This software must only be used in a processor manufactured by Nordic
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * Semiconductor ASA, or in a processor manufactured by a third party that
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * is used in combination with a processor manufactured by Nordic Semiconductor.
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR *
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/** /**

View File

@ -1,33 +1,37 @@
/* /*
* Copyright (c) Nordic Semiconductor ASA * Copyright (c) Nordic Semiconductor ASA
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without modification, * Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met: * are permitted provided that the following conditions are met:
* *
* 1. Redistributions of source code must retain the above copyright notice, this * 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer. * list of conditions and the following disclaimer.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this * 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or * list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution. * other materials provided with the distribution.
* *
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other * 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products * contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* * 4. This software must only be used in a processor manufactured by Nordic
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * Semiconductor ASA, or in a processor manufactured by a third party that
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * is used in combination with a processor manufactured by Nordic Semiconductor.
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR *
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/** /**

View File

@ -1,33 +1,37 @@
/* /*
* Copyright (c) Nordic Semiconductor ASA * Copyright (c) Nordic Semiconductor ASA
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without modification, * Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met: * are permitted provided that the following conditions are met:
* *
* 1. Redistributions of source code must retain the above copyright notice, this * 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer. * list of conditions and the following disclaimer.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this * 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or * list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution. * other materials provided with the distribution.
* *
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other * 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products * contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* * 4. This software must only be used in a processor manufactured by Nordic
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * Semiconductor ASA, or in a processor manufactured by a third party that
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * is used in combination with a processor manufactured by Nordic Semiconductor.
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR *
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/** /**

View File

@ -1,33 +1,37 @@
/* /*
* Copyright (c) Nordic Semiconductor ASA * Copyright (c) Nordic Semiconductor ASA
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without modification, * Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met: * are permitted provided that the following conditions are met:
* *
* 1. Redistributions of source code must retain the above copyright notice, this * 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer. * list of conditions and the following disclaimer.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this * 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or * list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution. * other materials provided with the distribution.
* *
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other * 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products * contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* * 4. This software must only be used in a processor manufactured by Nordic
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * Semiconductor ASA, or in a processor manufactured by a third party that
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * is used in combination with a processor manufactured by Nordic Semiconductor.
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR *
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/** /**

View File

@ -1,33 +1,37 @@
/* /*
* Copyright (c) Nordic Semiconductor ASA * Copyright (c) Nordic Semiconductor ASA
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without modification, * Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met: * are permitted provided that the following conditions are met:
* *
* 1. Redistributions of source code must retain the above copyright notice, this * 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer. * list of conditions and the following disclaimer.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this * 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or * list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution. * other materials provided with the distribution.
* *
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other * 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products * contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* * 4. This software must only be used in a processor manufactured by Nordic
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * Semiconductor ASA, or in a processor manufactured by a third party that
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * is used in combination with a processor manufactured by Nordic Semiconductor.
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR *
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/** /**

View File

@ -1,33 +1,37 @@
/* /*
* Copyright (c) Nordic Semiconductor ASA * Copyright (c) Nordic Semiconductor ASA
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without modification, * Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met: * are permitted provided that the following conditions are met:
* *
* 1. Redistributions of source code must retain the above copyright notice, this * 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer. * list of conditions and the following disclaimer.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this * 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or * list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution. * other materials provided with the distribution.
* *
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other * 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products * contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* * 4. This software must only be used in a processor manufactured by Nordic
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * Semiconductor ASA, or in a processor manufactured by a third party that
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * is used in combination with a processor manufactured by Nordic Semiconductor.
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR *
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/** /**

View File

@ -1,33 +1,37 @@
/* /*
* Copyright (c) Nordic Semiconductor ASA * Copyright (c) Nordic Semiconductor ASA
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without modification, * Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met: * are permitted provided that the following conditions are met:
* *
* 1. Redistributions of source code must retain the above copyright notice, this * 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer. * list of conditions and the following disclaimer.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this * 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or * list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution. * other materials provided with the distribution.
* *
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other * 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products * contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* * 4. This software must only be used in a processor manufactured by Nordic
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * Semiconductor ASA, or in a processor manufactured by a third party that
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * is used in combination with a processor manufactured by Nordic Semiconductor.
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR *
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/** /**
@ -54,7 +58,6 @@
/** @} */ /** @} */
#if 0 /* The following have been duplicated in blecommon.h */
/** @defgroup BLE_UUID_VALUES Assigned Values for BLE UUIDs /** @defgroup BLE_UUID_VALUES Assigned Values for BLE UUIDs
* @{ */ * @{ */
/* Generic UUIDs, applicable to all services */ /* Generic UUIDs, applicable to all services */
@ -80,7 +83,6 @@
#define BLE_UUID_GAP_CHARACTERISTIC_RECONN_ADDR 0x2A03 /**< Reconnection Address Characteristic. */ #define BLE_UUID_GAP_CHARACTERISTIC_RECONN_ADDR 0x2A03 /**< Reconnection Address Characteristic. */
#define BLE_UUID_GAP_CHARACTERISTIC_PPCP 0x2A04 /**< Peripheral Preferred Connection Parameters Characteristic. */ #define BLE_UUID_GAP_CHARACTERISTIC_PPCP 0x2A04 /**< Peripheral Preferred Connection Parameters Characteristic. */
/** @} */ /** @} */
#endif /* The following have been duplicated in blecommon.h */
/** @defgroup BLE_UUID_TYPES Types of UUID /** @defgroup BLE_UUID_TYPES Types of UUID
@ -91,7 +93,6 @@
/** @} */ /** @} */
#if 0 /* The following have been duplicated in blecommon.h */
/** @defgroup BLE_APPEARANCES Bluetooth Appearance values /** @defgroup BLE_APPEARANCES Bluetooth Appearance values
* @note Retrieved from http://developer.bluetooth.org/gatt/characteristics/Pages/CharacteristicViewer.aspx?u=org.bluetooth.characteristic.gap.appearance.xml * @note Retrieved from http://developer.bluetooth.org/gatt/characteristics/Pages/CharacteristicViewer.aspx?u=org.bluetooth.characteristic.gap.appearance.xml
* @{ */ * @{ */
@ -145,7 +146,6 @@
#define BLE_APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_POD 5187 /**< Location Pod (Outdoor Sports Activity subtype). */ #define BLE_APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_POD 5187 /**< Location Pod (Outdoor Sports Activity subtype). */
#define BLE_APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_AND_NAV_POD 5188 /**< Location and Navigation Pod (Outdoor Sports Activity subtype). */ #define BLE_APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_AND_NAV_POD 5188 /**< Location and Navigation Pod (Outdoor Sports Activity subtype). */
/** @} */ /** @} */
#endif /* The following have been duplicated in blecommon.h */
/** @brief Set .type and .uuid fields of ble_uuid_struct to specified uuid value. */ /** @brief Set .type and .uuid fields of ble_uuid_struct to specified uuid value. */
#define BLE_UUID_BLE_ASSIGN(instance, value) do {\ #define BLE_UUID_BLE_ASSIGN(instance, value) do {\

View File

@ -1,33 +1,37 @@
/* /*
* Copyright (c) Nordic Semiconductor ASA * Copyright (c) Nordic Semiconductor ASA
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without modification, * Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met: * are permitted provided that the following conditions are met:
* *
* 1. Redistributions of source code must retain the above copyright notice, this * 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer. * list of conditions and the following disclaimer.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this * 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or * list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution. * other materials provided with the distribution.
* *
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other * 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products * contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* * 4. This software must only be used in a processor manufactured by Nordic
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * Semiconductor ASA, or in a processor manufactured by a third party that
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * is used in combination with a processor manufactured by Nordic Semiconductor.
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR *
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/** /**
@defgroup nrf_error SoftDevice Global Error Codes @defgroup nrf_error SoftDevice Global Error Codes

View File

@ -1,33 +1,37 @@
/* /*
* Copyright (c) Nordic Semiconductor ASA * Copyright (c) Nordic Semiconductor ASA
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without modification, * Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met: * are permitted provided that the following conditions are met:
* *
* 1. Redistributions of source code must retain the above copyright notice, this * 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer. * list of conditions and the following disclaimer.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this * 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or * list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution. * other materials provided with the distribution.
* *
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other * 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products * contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* * 4. This software must only be used in a processor manufactured by Nordic
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * Semiconductor ASA, or in a processor manufactured by a third party that
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * is used in combination with a processor manufactured by Nordic Semiconductor.
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR *
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/** /**
@addtogroup nrf_sdm_api @addtogroup nrf_sdm_api

View File

@ -1,33 +1,37 @@
/* /*
* Copyright (c) Nordic Semiconductor ASA * Copyright (c) Nordic Semiconductor ASA
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without modification, * Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met: * are permitted provided that the following conditions are met:
* *
* 1. Redistributions of source code must retain the above copyright notice, this * 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer. * list of conditions and the following disclaimer.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this * 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or * list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution. * other materials provided with the distribution.
* *
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other * 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products * contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* * 4. This software must only be used in a processor manufactured by Nordic
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * Semiconductor ASA, or in a processor manufactured by a third party that
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * is used in combination with a processor manufactured by Nordic Semiconductor.
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR *
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/** /**
@addtogroup nrf_soc_api @addtogroup nrf_soc_api

View File

@ -1,33 +1,37 @@
/* /*
* Copyright (c) Nordic Semiconductor ASA * Copyright (c) Nordic Semiconductor ASA
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without modification, * Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met: * are permitted provided that the following conditions are met:
* *
* 1. Redistributions of source code must retain the above copyright notice, this * 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer. * list of conditions and the following disclaimer.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this * 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or * list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution. * other materials provided with the distribution.
* *
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other * 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products * contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* * 4. This software must only be used in a processor manufactured by Nordic
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * Semiconductor ASA, or in a processor manufactured by a third party that
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * is used in combination with a processor manufactured by Nordic Semiconductor.
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR *
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/** /**
@defgroup nrf_mbr_api Master Boot Record API @defgroup nrf_mbr_api Master Boot Record API

View File

@ -1,33 +1,37 @@
/* /*
* Copyright (c) Nordic Semiconductor ASA * Copyright (c) Nordic Semiconductor ASA
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without modification, * Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met: * are permitted provided that the following conditions are met:
* *
* 1. Redistributions of source code must retain the above copyright notice, this * 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer. * list of conditions and the following disclaimer.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this * 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or * list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution. * other materials provided with the distribution.
* *
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other * 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products * contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* * 4. This software must only be used in a processor manufactured by Nordic
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * Semiconductor ASA, or in a processor manufactured by a third party that
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * is used in combination with a processor manufactured by Nordic Semiconductor.
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR *
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/** /**
@defgroup nrf_sdm_api SoftDevice Manager API @defgroup nrf_sdm_api SoftDevice Manager API

View File

@ -1,33 +1,37 @@
/* /*
* Copyright (c) Nordic Semiconductor ASA * Copyright (c) Nordic Semiconductor ASA
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without modification, * Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met: * are permitted provided that the following conditions are met:
* *
* 1. Redistributions of source code must retain the above copyright notice, this * 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer. * list of conditions and the following disclaimer.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this * 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or * list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution. * other materials provided with the distribution.
* *
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other * 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products * contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* * 4. This software must only be used in a processor manufactured by Nordic
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * Semiconductor ASA, or in a processor manufactured by a third party that
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * is used in combination with a processor manufactured by Nordic Semiconductor.
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR *
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/** /**
* @defgroup nrf_soc_api SoC Library API * @defgroup nrf_soc_api SoC Library API

View File

@ -1,33 +1,37 @@
/* /*
* Copyright (c) Nordic Semiconductor ASA * Copyright (c) Nordic Semiconductor ASA
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without modification, * Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met: * are permitted provided that the following conditions are met:
* *
* 1. Redistributions of source code must retain the above copyright notice, this * 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer. * list of conditions and the following disclaimer.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this * 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or * list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution. * other materials provided with the distribution.
* *
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other * 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products * contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* * 4. This software must only be used in a processor manufactured by Nordic
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * Semiconductor ASA, or in a processor manufactured by a third party that
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * is used in combination with a processor manufactured by Nordic Semiconductor.
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR *
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
#ifndef NRF_SVC__ #ifndef NRF_SVC__
@ -43,14 +47,13 @@
#elif defined (__GNUC__) #elif defined (__GNUC__)
#define SVCALL(number, return_type, signature) \ #define SVCALL(number, return_type, signature) \
_Pragma("GCC diagnostic ignored \"-Wunused-function\"") \ _Pragma("GCC diagnostic ignored \"-Wunused-function\"") \
_Pragma("GCC diagnostic ignored \"-Wunused-parameter\"") \
_Pragma("GCC diagnostic push") \ _Pragma("GCC diagnostic push") \
_Pragma("GCC diagnostic ignored \"-Wreturn-type\"") \ _Pragma("GCC diagnostic ignored \"-Wreturn-type\"") \
__attribute__((naked)) static return_type signature \ __attribute__((naked)) static return_type signature \
{ \ { \
__asm( \ __asm( \
"svc %0\n" \ "svc %0\n" \
"bx r14" : : "I" ((uint32_t) number) : "r0" \ "bx r14" : : "I" (number) : "r0" \
); \ ); \
} \ } \
_Pragma("GCC diagnostic pop") _Pragma("GCC diagnostic pop")

View File

@ -1,33 +1,37 @@
/* /*
* Copyright (c) Nordic Semiconductor ASA * Copyright (c) Nordic Semiconductor ASA
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without modification, * Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met: * are permitted provided that the following conditions are met:
* *
* 1. Redistributions of source code must retain the above copyright notice, this * 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer. * list of conditions and the following disclaimer.
* *
* 2. Redistributions in binary form must reproduce the above copyright notice, this * 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or * list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution. * other materials provided with the distribution.
* *
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other * 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products * contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* * 4. This software must only be used in a processor manufactured by Nordic
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * Semiconductor ASA, or in a processor manufactured by a third party that
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * is used in combination with a processor manufactured by Nordic Semiconductor.
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR *
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/** @brief Utilities for verifying program logic /** @brief Utilities for verifying program logic

View File

@ -1,33 +1,31 @@
/* /* Copyright (c) 2015, Nordic Semiconductor ASA
* Copyright (c) Nordic Semiconductor ASA * All rights reserved.
* All rights reserved. *
* * Redistribution and use in source and binary forms, with or without
* Redistribution and use in source and binary forms, with or without modification, * modification, are permitted provided that the following conditions are met:
* are permitted provided that the following conditions are met: *
* * * Redistributions of source code must retain the above copyright notice, this
* 1. Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer.
* list of conditions and the following disclaimer. *
* * * Redistributions in binary form must reproduce the above copyright notice,
* 2. Redistributions in binary form must reproduce the above copyright notice, this * this list of conditions and the following disclaimer in the documentation
* list of conditions and the following disclaimer in the documentation and/or * and/or other materials provided with the distribution.
* other materials provided with the distribution. *
* * * Neither the name of Nordic Semiconductor ASA nor the names of its
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other * contributors may be used to endorse or promote products derived from
* contributors to this software may be used to endorse or promote products * this software without specific prior written permission.
* derived from this software without specific prior written permission. *
* * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS *
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
/* NOTE: Template files (including this one) are application specific and therefore expected to /* NOTE: Template files (including this one) are application specific and therefore expected to
@ -55,10 +53,6 @@ static bool is_disabled_in_debug_needed(void);
uint32_t SystemCoreClock __attribute__((used)) = __SYSTEM_CLOCK; uint32_t SystemCoreClock __attribute__((used)) = __SYSTEM_CLOCK;
#endif #endif
#ifndef YOTTA_CFG_HARDWARE_CLOCKS_NRF_LFCLK_SRC
# define YOTTA_CFG_HARDWARE_CLOCKS_NRF_LFCLK_SRC 1UL /* The default is to wait for LFLCK to start */
#endif
void SystemCoreClockUpdate(void) void SystemCoreClockUpdate(void)
{ {
SystemCoreClock = __SYSTEM_CLOCK; SystemCoreClock = __SYSTEM_CLOCK;
@ -86,17 +80,7 @@ void SystemInit(void)
if (is_disabled_in_debug_needed()) if (is_disabled_in_debug_needed())
{ {
NRF_MPU->DISABLEINDEBUG = MPU_DISABLEINDEBUG_DISABLEINDEBUG_Disabled << MPU_DISABLEINDEBUG_DISABLEINDEBUG_Pos; NRF_MPU->DISABLEINDEBUG = MPU_DISABLEINDEBUG_DISABLEINDEBUG_Disabled << MPU_DISABLEINDEBUG_DISABLEINDEBUG_Pos;
} }
// Start the external 32khz crystal oscillator.
NRF_CLOCK->LFCLKSRC = (YOTTA_CFG_HARDWARE_CLOCKS_NRF_LFCLK_SRC << CLOCK_LFCLKSRC_SRC_Pos);
NRF_CLOCK->EVENTS_LFCLKSTARTED = 0;
NRF_CLOCK->TASKS_LFCLKSTART = 1;
// Wait for the external oscillator to start up.
while (NRF_CLOCK->EVENTS_LFCLKSTARTED == 0) {
// Do nothing.
}
} }

View File

@ -1,33 +1,31 @@
/* /* Copyright (c) 2015, Nordic Semiconductor ASA
* Copyright (c) Nordic Semiconductor ASA * All rights reserved.
* All rights reserved. *
* * Redistribution and use in source and binary forms, with or without
* Redistribution and use in source and binary forms, with or without modification, * modification, are permitted provided that the following conditions are met:
* are permitted provided that the following conditions are met: *
* * * Redistributions of source code must retain the above copyright notice, this
* 1. Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer.
* list of conditions and the following disclaimer. *
* * * Redistributions in binary form must reproduce the above copyright notice,
* 2. Redistributions in binary form must reproduce the above copyright notice, this * this list of conditions and the following disclaimer in the documentation
* list of conditions and the following disclaimer in the documentation and/or * and/or other materials provided with the distribution.
* other materials provided with the distribution. *
* * * Neither the name of Nordic Semiconductor ASA nor the names of its
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other * contributors may be used to endorse or promote products derived from
* contributors to this software may be used to endorse or promote products * this software without specific prior written permission.
* derived from this software without specific prior written permission. *
* * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS *
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/ */
#ifndef SYSTEM_NRF51_H #ifndef SYSTEM_NRF51_H