porting to 52840
This commit is contained in:
@ -1,32 +1,44 @@
|
||||
/* Copyright (c) 2015, 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:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* * 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.
|
||||
*
|
||||
* * Neither the name of Nordic Semiconductor ASA nor the names of its
|
||||
* contributors 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.
|
||||
*
|
||||
*/
|
||||
/*
|
||||
|
||||
Copyright (c) 2010 - 2017, 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, except as embedded into a Nordic
|
||||
Semiconductor ASA integrated circuit in a product or a software update for
|
||||
such product, 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 its
|
||||
contributors may be used to endorse or promote products derived from this
|
||||
software without specific prior written permission.
|
||||
|
||||
4. This software, with or without modification, must only be used with a
|
||||
Nordic Semiconductor ASA integrated circuit.
|
||||
|
||||
5. Any software provided in binary form under this license must not be reverse
|
||||
engineered, decompiled, modified and/or disassembled.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
|
||||
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA 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 _COMPILER_ABSTRACTION_H
|
||||
#define _COMPILER_ABSTRACTION_H
|
||||
|
||||
@ -50,6 +62,10 @@
|
||||
#define __ALIGN(n) __align(n)
|
||||
#endif
|
||||
|
||||
#ifndef __PACKED
|
||||
#define __PACKED __packed
|
||||
#endif
|
||||
|
||||
#define GET_SP() __current_sp()
|
||||
|
||||
#elif defined ( __ICCARM__ )
|
||||
@ -66,11 +82,15 @@
|
||||
#define __WEAK __weak
|
||||
#endif
|
||||
|
||||
/* Not defined for IAR since it requires a new line to work, and C preprocessor does not allow that. */
|
||||
#ifndef __ALIGN
|
||||
#define __ALIGN(n)
|
||||
#define STRING_PRAGMA(x) _Pragma(#x)
|
||||
#define __ALIGN(n) STRING_PRAGMA(data_alignment = n)
|
||||
#endif
|
||||
|
||||
#ifndef __PACKED
|
||||
#define __PACKED __packed
|
||||
#endif
|
||||
|
||||
#define GET_SP() __get_SP()
|
||||
|
||||
#elif defined ( __GNUC__ )
|
||||
@ -91,6 +111,10 @@
|
||||
#define __ALIGN(n) __attribute__((aligned(n)))
|
||||
#endif
|
||||
|
||||
#ifndef __PACKED
|
||||
#define __PACKED __attribute__((packed))
|
||||
#endif
|
||||
|
||||
#define GET_SP() gcc_current_sp()
|
||||
|
||||
static inline unsigned int gcc_current_sp(void)
|
||||
@ -116,6 +140,11 @@
|
||||
#ifndef __ALIGN
|
||||
#define __ALIGN(n) __align(n)
|
||||
#endif
|
||||
|
||||
/* Not defined for TASKING. */
|
||||
#ifndef __PACKED
|
||||
#define __PACKED
|
||||
#endif
|
||||
|
||||
#define GET_SP() __get_MSP()
|
||||
|
||||
|
@ -1,62 +1,98 @@
|
||||
/* Copyright (c) 2015, 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:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* * 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.
|
||||
*
|
||||
* * Neither the name of Nordic Semiconductor ASA nor the names of its
|
||||
* contributors 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.
|
||||
*
|
||||
*/
|
||||
/*
|
||||
|
||||
Copyright (c) 2010 - 2017, 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, except as embedded into a Nordic
|
||||
Semiconductor ASA integrated circuit in a product or a software update for
|
||||
such product, 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 its
|
||||
contributors may be used to endorse or promote products derived from this
|
||||
software without specific prior written permission.
|
||||
|
||||
4. This software, with or without modification, must only be used with a
|
||||
Nordic Semiconductor ASA integrated circuit.
|
||||
|
||||
5. Any software provided in binary form under this license must not be reverse
|
||||
engineered, decompiled, modified and/or disassembled.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
|
||||
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA 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_H
|
||||
#define NRF_H
|
||||
|
||||
/* MDK version */
|
||||
#define MDK_MAJOR_VERSION 8
|
||||
#define MDK_MINOR_VERSION 5
|
||||
#define MDK_MINOR_VERSION 15
|
||||
#define MDK_MICRO_VERSION 0
|
||||
|
||||
/* Redefine "old" too-generic name NRF52 to NRF52832_XXAA to keep backwards compatibility. */
|
||||
#if defined (NRF52)
|
||||
#ifndef NRF52832_XXAA
|
||||
#define NRF52832_XXAA
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Define NRF52_SERIES for common use in nRF52 series devices. Only if not previously defined. */
|
||||
#if defined (NRF52810_XXAA) || defined (NRF52832_XXAA) || defined (NRF52832_XXAB) || defined (NRF52840_XXAA)
|
||||
#ifndef NRF52_SERIES
|
||||
#define NRF52_SERIES
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(_WIN32)
|
||||
/* Do not include nrf51 specific files when building for PC host */
|
||||
//#elif defined(__unix)
|
||||
/* Do not include nrf51 specific files when building for PC host */
|
||||
/* Do not include nrf specific files when building for PC host */
|
||||
#elif defined(__unix)
|
||||
/* Do not include nrf specific files when building for PC host */
|
||||
#elif defined(__APPLE__)
|
||||
/* Do not include nrf51 specific files when building for PC host */
|
||||
/* Do not include nrf specific files when building for PC host */
|
||||
#else
|
||||
|
||||
/* Family selection for family includes. */
|
||||
/* Device selection for device includes. */
|
||||
#if defined (NRF51)
|
||||
#include "nrf51.h"
|
||||
#include "nrf51_bitfields.h"
|
||||
#include "nrf51_deprecated.h"
|
||||
#elif defined (NRF52)
|
||||
#elif defined (NRF52840_XXAA)
|
||||
#include "nrf52840.h"
|
||||
#include "nrf52840_bitfields.h"
|
||||
#include "nrf51_to_nrf52840.h"
|
||||
#include "nrf52_to_nrf52840.h"
|
||||
#elif defined (NRF52832_XXAA) || defined (NRF52832_XXAB)
|
||||
#include "nrf52.h"
|
||||
#include "nrf52_bitfields.h"
|
||||
#include "nrf51_to_nrf52.h"
|
||||
#include "nrf52_name_change.h"
|
||||
#elif defined (NRF52810_XXAA)
|
||||
#include "nrf52810.h"
|
||||
#include "nrf52810_bitfields.h"
|
||||
#include "nrf51_to_nrf52810.h"
|
||||
#include "nrf52_to_nrf52810.h"
|
||||
#else
|
||||
#error "Device family must be defined. See nrf.h."
|
||||
#endif /* NRF51, NRF52 */
|
||||
#error "Device must be defined. See nrf.h."
|
||||
#endif /* NRF51, NRF52832_XXAA, NRF52832_XXAB, NRF52810_XXAA, NRF52840_XXAA */
|
||||
|
||||
#include "compiler_abstraction.h"
|
||||
|
||||
|
@ -1,32 +1,43 @@
|
||||
/* Copyright (c) 2015, 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:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* * 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.
|
||||
*
|
||||
* * Neither the name of Nordic Semiconductor ASA nor the names of its
|
||||
* contributors 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.
|
||||
*
|
||||
*/
|
||||
/*
|
||||
|
||||
Copyright (c) 2010 - 2017, 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, except as embedded into a Nordic
|
||||
Semiconductor ASA integrated circuit in a product or a software update for
|
||||
such product, 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 its
|
||||
contributors may be used to endorse or promote products derived from this
|
||||
software without specific prior written permission.
|
||||
|
||||
4. This software, with or without modification, must only be used with a
|
||||
Nordic Semiconductor ASA integrated circuit.
|
||||
|
||||
5. Any software provided in binary form under this license must not be reverse
|
||||
engineered, decompiled, modified and/or disassembled.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
|
||||
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA 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 NRF51_TO_NRF52_H
|
||||
#define NRF51_TO_NRF52_H
|
||||
@ -35,7 +46,7 @@
|
||||
|
||||
/* This file is given to prevent your SW from not compiling with the name changes between nRF51 and nRF52 devices.
|
||||
* It redefines the old nRF51 names into the new ones as long as the functionality is still supported. If the
|
||||
* functionality is gone, there old names are not define, so compilation will fail. Note that also includes macros
|
||||
* functionality is gone, there old names are not defined, so compilation will fail. Note that also includes macros
|
||||
* from the nrf51_deprecated.h file. */
|
||||
|
||||
|
||||
@ -82,6 +93,13 @@
|
||||
#define NRF_GPIO_BASE NRF_P0_BASE
|
||||
|
||||
|
||||
/* QDEC */
|
||||
/* The registers PSELA, PSELB and PSELLED were restructured into a struct. */
|
||||
#define PSELLED PSEL.LED
|
||||
#define PSELA PSEL.A
|
||||
#define PSELB PSEL.B
|
||||
|
||||
|
||||
/* SPIS */
|
||||
/* The registers PSELSCK, PSELMISO, PSELMOSI, PSELCSN were restructured into a struct. */
|
||||
#define PSELSCK PSEL.SCK
|
||||
@ -524,6 +542,16 @@
|
||||
#define LPCOMP_COMP_IRQn COMP_LPCOMP_IRQn
|
||||
|
||||
|
||||
/* REFSEL register redefined enumerated values and added some more. */
|
||||
#define LPCOMP_REFSEL_REFSEL_SupplyOneEighthPrescaling LPCOMP_REFSEL_REFSEL_Ref1_8Vdd
|
||||
#define LPCOMP_REFSEL_REFSEL_SupplyTwoEighthsPrescaling LPCOMP_REFSEL_REFSEL_Ref2_8Vdd
|
||||
#define LPCOMP_REFSEL_REFSEL_SupplyThreeEighthsPrescaling LPCOMP_REFSEL_REFSEL_Ref3_8Vdd
|
||||
#define LPCOMP_REFSEL_REFSEL_SupplyFourEighthsPrescaling LPCOMP_REFSEL_REFSEL_Ref4_8Vdd
|
||||
#define LPCOMP_REFSEL_REFSEL_SupplyFiveEighthsPrescaling LPCOMP_REFSEL_REFSEL_Ref5_8Vdd
|
||||
#define LPCOMP_REFSEL_REFSEL_SupplySixEighthsPrescaling LPCOMP_REFSEL_REFSEL_Ref6_8Vdd
|
||||
#define LPCOMP_REFSEL_REFSEL_SupplySevenEighthsPrescaling LPCOMP_REFSEL_REFSEL_Ref7_8Vdd
|
||||
|
||||
|
||||
/* RADIO */
|
||||
/* The name of the field SKIPADDR was corrected. Old macros added for compatibility. */
|
||||
#define RADIO_CRCCNF_SKIP_ADDR_Pos RADIO_CRCCNF_SKIPADDR_Pos
|
||||
|
@ -6,38 +6,47 @@
|
||||
* nrf52 from Nordic Semiconductor.
|
||||
*
|
||||
* @version V1
|
||||
* @date 23. February 2016
|
||||
* @date 3. October 2017
|
||||
*
|
||||
* @note Generated with SVDConv V2.81d
|
||||
* from CMSIS SVD File 'nrf52.svd' Version 1,
|
||||
*
|
||||
* @par Copyright (c) 2015, Nordic Semiconductor ASA
|
||||
* @par Copyright (c) 2010 - 2017, 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:
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* 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.
|
||||
*
|
||||
* * 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.
|
||||
* 2. Redistributions in binary form, except as embedded into a Nordic
|
||||
* Semiconductor ASA integrated circuit in a product or a software update for
|
||||
* such product, 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.
|
||||
*
|
||||
* * Neither the name of Nordic Semiconductor ASA nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
* 3. Neither the name of Nordic Semiconductor ASA nor the names of its
|
||||
* contributors 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.
|
||||
* 4. This software, with or without modification, must only be used with a
|
||||
* Nordic Semiconductor ASA integrated circuit.
|
||||
*
|
||||
* 5. Any software provided in binary form under this license must not be reverse
|
||||
* engineered, decompiled, modified and/or disassembled.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA 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.
|
||||
*
|
||||
*
|
||||
*******************************************************************************************************/
|
||||
@ -212,25 +221,6 @@ typedef struct {
|
||||
__I uint32_t RESERVED0;
|
||||
} POWER_RAM_Type;
|
||||
|
||||
typedef struct {
|
||||
__IO uint32_t CPU0; /*!< AHB bus master priority register for CPU0 */
|
||||
__IO uint32_t SPIS1; /*!< AHB bus master priority register for SPIM1, SPIS1, TWIM1 and
|
||||
TWIS1 */
|
||||
__IO uint32_t RADIO; /*!< AHB bus master priority register for RADIO */
|
||||
__IO uint32_t ECB; /*!< AHB bus master priority register for ECB */
|
||||
__IO uint32_t CCM; /*!< AHB bus master priority register for CCM */
|
||||
__IO uint32_t AAR; /*!< AHB bus master priority register for AAR */
|
||||
__IO uint32_t SAADC; /*!< AHB bus master priority register for SAADC */
|
||||
__IO uint32_t UARTE; /*!< AHB bus master priority register for UARTE */
|
||||
__IO uint32_t SERIAL0; /*!< AHB bus master priority register for SPIM0, SPIS0, TWIM0 and
|
||||
TWIS0 */
|
||||
__IO uint32_t SERIAL2; /*!< AHB bus master priority register for SPIM2 and SPIS2 */
|
||||
__IO uint32_t NFCT; /*!< AHB bus master priority register for NFCT */
|
||||
__IO uint32_t I2S; /*!< AHB bus master priority register for I2S */
|
||||
__IO uint32_t PDM; /*!< AHB bus master priority register for PDM */
|
||||
__IO uint32_t PWM; /*!< AHB bus master priority register for PWM0, PWM1 and PWM2 */
|
||||
} AMLI_RAMPRI_Type;
|
||||
|
||||
typedef struct {
|
||||
__IO uint32_t RTS; /*!< Pin select for RTS signal */
|
||||
__IO uint32_t TXD; /*!< Pin select for TXD signal */
|
||||
@ -371,12 +361,12 @@ typedef struct {
|
||||
} QDEC_PSEL_Type;
|
||||
|
||||
typedef struct {
|
||||
__IO uint32_t PTR; /*!< Description cluster[0]: Beginning address in Data RAM of sequence
|
||||
A */
|
||||
__IO uint32_t CNT; /*!< Description cluster[0]: Amount of values (duty cycles) in sequence
|
||||
A */
|
||||
__IO uint32_t PTR; /*!< Description cluster[0]: Beginning address in Data RAM of this
|
||||
sequence */
|
||||
__IO uint32_t CNT; /*!< Description cluster[0]: Amount of values (duty cycles) in this
|
||||
sequence */
|
||||
__IO uint32_t REFRESH; /*!< Description cluster[0]: Amount of additional PWM periods between
|
||||
samples loaded to compare register (load every CNT+1 PWM periods) */
|
||||
samples loaded into compare register */
|
||||
__IO uint32_t ENDDELAY; /*!< Description cluster[0]: Time added after the sequence */
|
||||
__I uint32_t RESERVED1[4];
|
||||
} PWM_SEQ_Type;
|
||||
@ -633,28 +623,12 @@ typedef struct { /*!< CLOCK Structure
|
||||
__I uint32_t RESERVED5[62];
|
||||
__IO uint32_t LFCLKSRC; /*!< Clock source for the LFCLK */
|
||||
__I uint32_t RESERVED6[7];
|
||||
__IO uint32_t CTIV; /*!< Calibration timer interval (retained register, same reset behaviour
|
||||
as RESETREAS) */
|
||||
__IO uint32_t CTIV; /*!< Calibration timer interval */
|
||||
__I uint32_t RESERVED7[8];
|
||||
__IO uint32_t TRACECONFIG; /*!< Clocking options for the Trace Port debug interface */
|
||||
} NRF_CLOCK_Type;
|
||||
|
||||
|
||||
/* ================================================================================ */
|
||||
/* ================ AMLI ================ */
|
||||
/* ================================================================================ */
|
||||
|
||||
|
||||
/**
|
||||
* @brief AHB Multi-Layer Interface (AMLI)
|
||||
*/
|
||||
|
||||
typedef struct { /*!< AMLI Structure */
|
||||
__I uint32_t RESERVED0[896];
|
||||
AMLI_RAMPRI_Type RAMPRI; /*!< RAM configurable priority configuration structure */
|
||||
} NRF_AMLI_Type;
|
||||
|
||||
|
||||
/* ================================================================================ */
|
||||
/* ================ RADIO ================ */
|
||||
/* ================================================================================ */
|
||||
@ -754,9 +728,12 @@ typedef struct { /*!< UARTE Structure
|
||||
__I uint32_t RESERVED1[52];
|
||||
__IO uint32_t EVENTS_CTS; /*!< CTS is activated (set low). Clear To Send. */
|
||||
__IO uint32_t EVENTS_NCTS; /*!< CTS is deactivated (set high). Not Clear To Send. */
|
||||
__I uint32_t RESERVED2[2];
|
||||
__IO uint32_t EVENTS_RXDRDY; /*!< Data received in RXD (but potentially not yet transferred to
|
||||
Data RAM) */
|
||||
__I uint32_t RESERVED2;
|
||||
__IO uint32_t EVENTS_ENDRX; /*!< Receive buffer is filled up */
|
||||
__I uint32_t RESERVED3[3];
|
||||
__I uint32_t RESERVED3[2];
|
||||
__IO uint32_t EVENTS_TXDRDY; /*!< Data sent from TXD */
|
||||
__IO uint32_t EVENTS_ENDTX; /*!< Last TX byte transmitted */
|
||||
__IO uint32_t EVENTS_ERROR; /*!< Error detected */
|
||||
__I uint32_t RESERVED4[7];
|
||||
@ -779,7 +756,7 @@ typedef struct { /*!< UARTE Structure
|
||||
__I uint32_t RESERVED11;
|
||||
UARTE_PSEL_Type PSEL; /*!< Unspecified */
|
||||
__I uint32_t RESERVED12[3];
|
||||
__IO uint32_t BAUDRATE; /*!< Baud rate */
|
||||
__IO uint32_t BAUDRATE; /*!< Baud rate. Accuracy depends on the HFCLK source selected. */
|
||||
__I uint32_t RESERVED13[3];
|
||||
UARTE_RXD_Type RXD; /*!< RXD EasyDMA channel */
|
||||
__I uint32_t RESERVED14;
|
||||
@ -874,7 +851,7 @@ typedef struct { /*!< SPIM Structure
|
||||
__I uint32_t RESERVED10;
|
||||
SPIM_PSEL_Type PSEL; /*!< Unspecified */
|
||||
__I uint32_t RESERVED11[4];
|
||||
__IO uint32_t FREQUENCY; /*!< SPI frequency */
|
||||
__IO uint32_t FREQUENCY; /*!< SPI frequency. Accuracy depends on the HFCLK source selected. */
|
||||
__I uint32_t RESERVED12[3];
|
||||
SPIM_RXD_Type RXD; /*!< RXD EasyDMA channel */
|
||||
SPIM_TXD_Type TXD; /*!< TXD EasyDMA channel */
|
||||
@ -1977,7 +1954,6 @@ typedef struct { /*!< GPIO Structure
|
||||
#define NRF_BPROT_BASE 0x40000000UL
|
||||
#define NRF_POWER_BASE 0x40000000UL
|
||||
#define NRF_CLOCK_BASE 0x40000000UL
|
||||
#define NRF_AMLI_BASE 0x40000000UL
|
||||
#define NRF_RADIO_BASE 0x40001000UL
|
||||
#define NRF_UARTE0_BASE 0x40002000UL
|
||||
#define NRF_UART0_BASE 0x40002000UL
|
||||
@ -2049,7 +2025,6 @@ typedef struct { /*!< GPIO Structure
|
||||
#define NRF_BPROT ((NRF_BPROT_Type *) NRF_BPROT_BASE)
|
||||
#define NRF_POWER ((NRF_POWER_Type *) NRF_POWER_BASE)
|
||||
#define NRF_CLOCK ((NRF_CLOCK_Type *) NRF_CLOCK_BASE)
|
||||
#define NRF_AMLI ((NRF_AMLI_Type *) NRF_AMLI_BASE)
|
||||
#define NRF_RADIO ((NRF_RADIO_Type *) NRF_RADIO_BASE)
|
||||
#define NRF_UARTE0 ((NRF_UARTE_Type *) NRF_UARTE0_BASE)
|
||||
#define NRF_UART0 ((NRF_UART_Type *) NRF_UART0_BASE)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,32 +1,43 @@
|
||||
/* Copyright (c) 2015, 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:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* * 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.
|
||||
*
|
||||
* * Neither the name of Nordic Semiconductor ASA nor the names of its
|
||||
* contributors 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.
|
||||
*
|
||||
*/
|
||||
/*
|
||||
|
||||
Copyright (c) 2010 - 2017, 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, except as embedded into a Nordic
|
||||
Semiconductor ASA integrated circuit in a product or a software update for
|
||||
such product, 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 its
|
||||
contributors may be used to endorse or promote products derived from this
|
||||
software without specific prior written permission.
|
||||
|
||||
4. This software, with or without modification, must only be used with a
|
||||
Nordic Semiconductor ASA integrated circuit.
|
||||
|
||||
5. Any software provided in binary form under this license must not be reverse
|
||||
engineered, decompiled, modified and/or disassembled.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
|
||||
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA 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 NRF52_NAME_CHANGE_H
|
||||
#define NRF52_NAME_CHANGE_H
|
||||
@ -60,9 +71,9 @@
|
||||
#define I2S_CONFIG_CHANNELS_CHANNELS_LEFT I2S_CONFIG_CHANNELS_CHANNELS_Left
|
||||
#define I2S_CONFIG_CHANNELS_CHANNELS_RIGHT I2S_CONFIG_CHANNELS_CHANNELS_Right
|
||||
|
||||
|
||||
|
||||
|
||||
/* LPCOMP */
|
||||
/* Corrected typo in RESULT register. */
|
||||
#define LPCOMP_RESULT_RESULT_Bellow LPCOMP_RESULT_RESULT_Below
|
||||
|
||||
/*lint --flb "Leave library region" */
|
||||
|
||||
|
Reference in New Issue
Block a user